【发布时间】:2012-12-23 15:40:29
【问题描述】:
我正在开发一个用 Ruby 自定义编写的小型 CMS,该网站使用 Mongrel 运行。 不幸的是,我对 Ruby 一点也不熟悉。网站的一部分最近停止工作(与任何更新无关,所以我不确定是什么原因)
检查 rails 日志中的“production.log”显示如下:
ActionView::TemplateError(nil:NilClass 的未定义方法“名称”) 在 app/views/static/frontpage.rhtml 的第 25 行:22: 4, :order =>'date DESC').each |tabloid|%> 23:24: 'tabloid', :action => 'show', :id => tabloid.id %> 25:
By: [ "user_id = ?", tabloid.user_id]).name %> [ "user_id = ?", tabloid.user_id]).surname %>
26: 27: 250 %> 28:", :controller => 'tabloid', :action => 'show', :id => tabloid.id %>
app/views/static/frontpage.rhtml:25 app/views/static/frontpage.rhtml:22:in `each' app/views/static/frontpage.rhtml:22 /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in
send' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:inrender' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_view/template.rb:73:inrender_template' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_view/base.rb:256:inrender' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_view/base.rb:367:in_render_with_layout' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_view/base.rb:254:inrender' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:inrender_for_file' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:896:inrender_without_benchmark' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:inrender' /usr/local/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:inrealtime' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:inrender' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:868:inrender_without_benchmark' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:inrender' /usr/local/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:inrealtime' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:inrender' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:indispatch' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:indispatch_cgi' /usr/local/rubygems/gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:indispatch' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:inprocess' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in同步' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:inprocess' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel.rb:159:inprocess_client' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel.rb:158:ineach' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel.rb:158:inprocess_client' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel.rb:285:inrun' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel.rb:285:ininitialize' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel.rb:285:innew' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:inrun' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:ineach' /usr/local/rubygems/gems/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:inrun'
等等。 Mongrel 日志实际上已经有一段时间没有更新了。关于问题是什么或我应该在哪里继续挖掘的任何指示?
【问题讨论】:
标签: ruby-on-rails ruby mongrel