cukeのように(少なくともテンプレートに問題が発生したときに)完全なエラーメッセージが表示されないため、問題を見つけるのが難しくなります。ここでキュウリショーフル(レール)エラーメッセージを表示するには?
は、それが何らかのエラーに出力するものである:
... And I am on checkout page # features/step_definitions/webrat_steps.rb:6 You have a nil object when you didn't expect it! The error occurred while evaluating nil.items (ActionView::TemplateError) features/manage_orders.feature:9:in `And I am on checkout page' ...
そしてここでは、同じ問題がブラウザで再生したときのショーをレールです:
Showing app/views/cart/show.erb where line #46 raised:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.items
Extracted source (around line #46):
43: </script>
44:
45: <% ths = %w{th_title th_price th_subtotal th_quantity}.collect {|th| t th.intern} %>
46: <% table(@cart.items, ths) do |cart_item, style| -%>
47: <tr class="<%= style %>">
48: <td width="60%"><%=h cart_item.title %></td>
49: <td width="20%"><%=number_to_currency cart_item.price %></td>
前者は少しもきちんとしています。 cucumber.logにも例外はありません。私のテンプレートには部分とレイアウトがほとんどありません。与えられた手がかりはない、かなりの調査。
キュウリショーの完全なエラーを取得するためにプルする秘密のプラグインはありますか?
あなたの質問のタイトルは良い曲やテレビシリーズのエピソードタイトルを作ったが、SOの質問ではないので、私はそれを改造した: – karim79