未初始化的常量ActionView :: Helpers :: ActiveModelHelper(NameError)

时间:2016-04-26 13:11:59

标签: ruby rubygems redmine

让Redmine在使用Passenger的Centos 7上工作时遇到问题。

redmine安装一切正常我收到以下错误(在浏览器中):

uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:40:in `<module:Helpers>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:4:in `<module:ActionView>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:3:in `<top (required)>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.5/lib/action_view/base.rb:5:in `<top (required)>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.5/lib/action_view/view_paths.rb:1:in `<top (required)>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/abstract_controller/rendering.rb:4:in `<top (required)>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_controller/base.rb:204:in `<class:Base>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_controller/base.rb:164:in `<module:ActionController>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_controller/base.rb:5:in `<top (required)>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionpack-action_caching-1.1.1/lib/action_controller/action_caching.rb:13:in `<top (required)>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionpack-action_caching-1.1.1/lib/actionpack/action_caching.rb:1:in `require'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/actionpack-action_caching-1.1.1/lib/actionpack/action_caching.rb:1:in `<top (required)>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:91:in `require'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:91:in `rescue in block in require'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:68:in `block in require'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
  /home/redmine/redmine/config/application.rb:5:in `<top (required)>'
  /home/redmine/redmine/config/environment.rb:2:in `require'
  /home/redmine/redmine/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
  /home/redmine/.rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /home/tracks/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/passenger-5.0.26/src/helper-scripts/rack-preloader.rb:110:in `eval'
  /home/tracks/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/passenger-5.0.26/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /home/tracks/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/passenger-5.0.26/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /home/tracks/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/passenger-5.0.26/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /home/tracks/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/passenger-5.0.26/src/helper-scripts/rack-preloader.rb:29:in `<main>'

欢迎任何有关尝试尝试的建议。

注意:我已经更新了nokogiri所以问题就在那里。

1 个答案:

答案 0 :(得分:0)

通过添加到网站的VirtualHost解决了这个问题:

using ::operator<<;