开发者

rails 3.1 upgrade => error

I just upgraded an existing rails 3 app to rails 3.1

I get this on any request:

Error during failsafe response: wrong number of arguments (6 for 5)
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_v开发者_开发技巧iew/lookup_context.rb:85:in `find'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/lookup_context.rb:85:in `find_template'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:3:in `__send__'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:3:in `find_template'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:23:in `determine_template'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/lookup_context.rb:106:in `with_fallbacks'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:3:in `__send__'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:3:in `with_fallbacks'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:23:in `determine_template'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:10:in `render'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:22:in `wrap_formats'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:9:in `render'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/renderer.rb:36:in `render_template'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/renderer/renderer.rb:17:in `render'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_view/helpers/rendering_helper.rb:24:in `render'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_dispatch/middleware/show_exceptions.rb:89:in `rescue_action_locally'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_dispatch/middleware/show_exceptions.rb:69:in `render_exception'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_dispatch/middleware/show_exceptions.rb:59:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/rack/logger.rb:13:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/rack-1.3.2/lib/rack/methodoverride.rb:24:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/rack-1.3.2/lib/rack/runtime.rb:17:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/activesupport-3.1.0/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/rack-1.3.2/lib/rack/lock.rb:15:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/actionpack-3.1.0/lib/action_dispatch/middleware/static.rb:53:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/engine.rb:455:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/rack/content_length.rb:16:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/rack/log_tailer.rb:14:in `call'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/rack-1.3.2/lib/rack/handler/webrick.rb:59:in `service'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:162:in `start'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:95:in `start'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:92:in `each'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:92:in `start'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:23:in `start'
  /Users/janlimpens/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:82:in `start'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/rack-1.3.2/lib/rack/handler/webrick.rb:13:in `run'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/rack-1.3.2/lib/rack/server.rb:265:in `start'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/commands/server.rb:70:in `start'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/commands.rb:54
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap'
  /Users/janlimpens/.rvm/gems/ruby-1.8.7-p352@rails3/gems/railties-3.1.0/lib/rails/commands.rb:49
  script/rails:6:in `require'
  script/rails:6

What's wrong?


Do you have inherited_resources_views installed? I did, and got this hard-to-debug error. Removing the gem fixed the problem.

See https://github.com/fredwu/inherited_resources_views/commit/92f06650692e2a20b3d3e217775f78edc48a863b

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜