[英]Problem application Rails 2 using bundler
I am using Rails 2.3.11 end the error is: 我正在使用Rails 2.3.11结束,错误是:
NoMethodError in Configurations#index Configurations#index中的NoMethodError
Showing rails/ruby/1.8/gems/actionpack-2.3.11/lib/action_controller/templates/rescues/diagnostics.erb where line #7 raised: 显示rails / ruby / 1.8 / gems / actionpack-2.3.11 / lib / action_controller / templates / rescues / diagnostics.erb,其中第7行出现:
private method `gsub' called for nil:NilClass 私有方法`gsub'要求nil:NilClass
Extracted source (around line #7): 提取的源(第7行附近):
4: in <%=h request.parameters['controller'].humanize %>Controller<% if request.parameters['action'] %>#<%=h request.parameters['action'] %><% end %>
5: <% end %>
6: </h1>
7: <pre><%=h @exception.clean_message %></pre>
8:
9: <%= render :file => @rescues_path["rescues/_trace.erb"] %>
10:
My feeling is that @exception
is null, since no exceptions were raised on page. 我的感觉是@exception
为null,因为页面上未引发任何异常。
Try something like: 尝试类似:
<% if !@exception.nil? %>
<%=h @exception.clean_message %>
<% end %>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.