Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/53.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在openshift上部署时未初始化的常量ActionView::Helpers::ActiveModelHelper_Ruby On Rails_Openshift - Fatal编程技术网

Ruby on rails 在openshift上部署时未初始化的常量ActionView::Helpers::ActiveModelHelper

Ruby on rails 在openshift上部署时未初始化的常量ActionView::Helpers::ActiveModelHelper,ruby-on-rails,openshift,Ruby On Rails,Openshift,我试图在openshift上部署我的rails应用程序,但出现了以下错误。 显示此错误: 您已经激活了rack 1.5.2,但您的Gemfile需要rack 1.6.0。使用bundle exec可以解决这个问题。(Gem::LoadError) remote:未初始化的常量ActionView::Helpers::ActiveModelHelper 远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vend

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

remote:未初始化的常量ActionView::Helpers::ActiveModelHelper
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action\u view/helpers.rb:40:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app-root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action\u view/helpers.rb:4:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action\u view/helpers.rb:3:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action\u view/base.rb:5:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionview-4.2.0/lib/action\u view/view\u路径。rb:1:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/abstract\u controller/rendering.rb:4:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/action\u controller/base.rb:204:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/action\u controller/base.rb:164:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/actionpack-4.2.0/lib/action\u controller/base.rb:5:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/responders-2.0.2/lib/responders/controller_方法。rb:37:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/responders-2.0.2/lib/responders.rb:15:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/responders-2.0.2/lib/responders.rb:9:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/vendor
/bundle/ruby/gems/designe-3.4.1/lib/designe.rb:7:in`'
远程:/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级)in require'
远程:/opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in'each'
远程:/opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in'block in require'
远程:/opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in'each'
远程:/opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in'require'
远程:/opt/rh/ror40/root/usr/share/gems/gems/bundler-1.3.5/lib/bundler.rb:132:in'require'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/config/application.rb:9:in`'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/Rakefile:4:in'require'
远程:/var/lib/openshift/54bc0eee5973ca3f54000153/app root/runtime/repo/Rakefile:4:in`'
远程:(通过使用--trace运行任务查看完整跟踪)
远程:已禁用资产编译或未检测到资产。
远程:启动Ruby盒带
远程:-------------------------
远程:Git Post接收结果:成功
远程:激活状态:成功
远程:部署已完成,状态为:成功
到ssh://54bc0eee5973ca3f54000153@livechat rdemidovapps.rhcloud.com/~/git/livechat.git/

actionpack 4.2需要机架~>1.6.0。您的gem文件可能不包括机架gem。您可以尝试将此行添加到您的文件中

gem 'rack', '~> 1.6.0'
然后跑

bundle install  


这可能会迫使openshift环境使用最新的机架gem。

openshift内部依赖于RHEL 6.6 SCL,其中包括机架版本1.5.2和乘客版本4.0.18。不幸的是,所有这些都无法更新到今天。

作为故障排除的开始步骤,重命名Gemfile.lock(或删除它),然后重新安装您的bundle
bundle install

openshift ruby cartridge似乎不支持rails 4.2。rails 4.1可以很好地使用它。这是因为从日志中可以看出机架不兼容。Openshift已经激活了rack 1.5.2,而rails 4.2。机架至少需要1.6.0版本。您可以查看以下答案:
bundle install  
git push origin