在openshift上部署时未初始化的常量ActionView :: Helpers :: ActiveModelHelper [英] uninitialized constant ActionView::Helpers::ActiveModelHelper when deploying on openshift

查看:68
本文介绍了在openshift上部署时未初始化的常量ActionView :: Helpers :: ActiveModelHelper的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在openshift上部署我的rails应用程序,但出现此错误. Phusion Passenger显示此错误: 您已经激活了机架1.5.2,但是您的Gemfile需要机架1.6.0.使用bundle exec可以解决这个问题. (Gem :: LoadError)

I am trying to deploy my rails app on openshift, but i get this errors. Phusion Passenger show this error: You have already activated rack 1.5.2, but your Gemfile requires rack 1.6.0. Using bundle exec may solve this. (Gem::LoadError)

remote: uninitialized constant ActionView::Helpers::ActiveModelHelper
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action_view/helpers.rb:40:in `<module:Helpers>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app- root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action_view/helpers.rb:4:in `<module:ActionView>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action_view/helpers.rb:3:in `<top (required)>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action_view/base.rb:5:in `<top (required)>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action_view/view_paths.rb:1:in `<top (required)>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/abstract_controller/rendering.rb:4:in `<top (required)>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/action_controller/base.rb:204:in `<class:Base>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/action_controller/base.rb:164:in `<module:ActionController>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/action_controller/base.rb:5:in `<top (required)>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/responders-2.0.2/lib/responders/controller_method.rb:37:in `<top (required)>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/responders-2.0.2/lib/responders.rb:15:in `<module:Responders>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/responders-2.0.2/lib/responders.rb:9:in `<top (required)>'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/devise-3.4.1/lib/devise.rb:7:in `<top (required)>'
remote: /opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
remote: /opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
remote: /opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
remote: /opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
remote: /opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
remote: /opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
 remote: /opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
 remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/config/application.rb:9:in `<top (required)>'
 remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/Rakefile:4:in `require'
remote: /var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/Rakefile:4:in `<top (required)>'
remote: (See full trace by running task with --trace)
remote: Compilation of assets is disabled or assets not detected.
remote: Starting Ruby cartridge
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://54bc0eee5973ca3f54000153@livechat-rdemidovapps.rhcloud.com/~/git/livechat.git/

推荐答案

actionpack 4.2需要机架〜> 1.6.0.您的Gemfile可能不包含机架宝石.您可以尝试将此行添加到您的Gemfile

actionpack 4.2 needs rack ~> 1.6.0. Your Gemfile probably does not include rack gem. You can try adding this line to your Gemfile

gem 'rack', '~> 1.6.0'

然后运行

bundle install  

git push origin

这可能会迫使openshift环境使用最新的机架宝石.

This might force the openshift environment to use latest rack gem.

这篇关于在openshift上部署时未初始化的常量ActionView :: Helpers :: ActiveModelHelper的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆