rails 3.1从3.0升级。渲染错误。

时间:2014-01-21 12:09:44

标签: ruby-on-rails ruby-on-rails-3.1

我将rails从3.0.20升级到3.1.12。我还没有启用资产管道。我现在正在坚持下面这个错误。在每个请求上获取它。有任何想法吗?

Error during failsafe response: wrong number of arguments (6 for 5)
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/lookup_context.rb:85:in `find'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/lookup_context.rb:85:in `find_template'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/abstract_renderer.rb:3:in `__send__'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/abstract_renderer.rb:3:in `find_template'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/template_renderer.rb:23:in `determine_template'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/lookup_context.rb:106:in `with_fallbacks'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/abstract_renderer.rb:3:in `__send__'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/abstract_renderer.rb:3:in `with_fallbacks'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/template_renderer.rb:23:in `determine_template'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/template_renderer.rb:10:in `render'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/abstract_renderer.rb:22:in `wrap_formats'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/template_renderer.rb:9:in `render'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/renderer.rb:36:in `render_template'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/renderer/renderer.rb:17:in `render'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_view/helpers/rendering_helper.rb:24:in `render'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_dispatch/middleware/show_exceptions.rb:89:in `rescue_action_locally'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_dispatch/middleware/show_exceptions.rb:69:in `render_exception'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_dispatch/middleware/show_exceptions.rb:59:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/railties-3.1.12/lib/rails/rack/logger.rb:13:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/rack-1.3.10/lib/rack/methodoverride.rb:24:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/rack-1.3.10/lib/rack/runtime.rb:17:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/activesupport-3.1.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/rack-1.3.10/lib/rack/lock.rb:15:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/actionpack-3.1.12/lib/action_dispatch/middleware/static.rb:61:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/railties-3.1.12/lib/rails/engine.rb:456:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/railties-3.1.12/lib/rails/application.rb:143:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/rack-1.3.10/lib/rack/content_length.rb:14:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/railties-3.1.12/lib/rails/rack/log_tailer.rb:14:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p357@rails3112/gems/rack-1.3.10/lib/rack/handler/webrick.rb:59:in `service'
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'

1 个答案:

答案 0 :(得分:0)

我的方式是:

  1. 启动一个新的rails 3.1.12项目并查看它是否运行。

  2. 将宝石添加到您的Gemfile中,看看是否一切仍然有效。

  3. 按此顺序开始导入部分文件:

    1. environment.rb和环境文件,例如development.rb
    2. config / initializers中的文件
    3. 你的config / routes.rb
    4. app / 下的
    5. 文件