将rails 2升级到3时出错`const_get':未初始化的常量ActionView :: ActionViewError(NameError)

时间:2014-11-03 12:40:08

标签: ruby-on-rails ruby ruby-on-rails-3

我正在尝试使用rails升级程序gem将rails 2应用程序升级到rails3,但启动服务器显示以下错误,可能是什么原因

  $bundle exec rails server
    /home/user/.rvm/gems/ruby-1.8.7-head/gems/haml-4.0.5/lib/haml/parser.rb:86: warning: regexp has invalid interval
    DEPRECATION WARNING: RAILS_ENV is deprecated. Please use ::Rails.env. (called from /home/user/projects/fedena/config/application.rb:5)
    => Booting Mongrel
    => Rails 3.0.9 application starting in development on http://127.0.0.1:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    Exiting
    /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.9/lib/active_support/core_ext/module/introspection.rb:70:in `const_get': uninitialized constant ActionView::ActionViewError (NameError)
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.9/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants'
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.9/lib/active_support/core_ext/module/introspection.rb:70:in `each'
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.9/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants'
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.9/lib/active_support/core_ext/module/introspection.rb:68:in `each'
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.9/lib/active_support/core_ext/module/introspection.rb:68:in `local_constants'
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.9/lib/active_support/core_ext/module/introspection.rb:86:in `local_constant_names'
        from /home/user/projects/fedena/config.ru:3
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/rack-1.2.8/lib/rack/builder.rb:46:in `instance_eval'
        from /home/user/.rvm/gems/ruby-1.8.7-head/gems/rack-1.2.8/lib/rack/builder.rb:46:in `initialize'
        from /home/user/projects/fedena/config.ru:1:in `new'
        from /home/user/projects/fedena/config.ru:1

0 个答案:

没有答案