1

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/
romandemidov
  • 76
  • 1
  • 5

3 Answers3

0

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'

and then run

bundle install  

and

git push origin

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

journeyer
  • 800
  • 1
  • 7
  • 17
  • 1
    It appears that openshift ruby cartridge does not support rails 4.2. rails 4.1 works fine with it. This is because of rack incompatibility as seen from your logs. Openshift already activates rack 1.5.2, while rails 4.2. needs a minimum version of 1.6.0 for rack. – journeyer Jan 20 '15 at 04:11
0

OpenShift is internally dependent on RHEL 6.6 SCL ror40 which includes rack version 1.5.2 and passenger 4.0.18. Unfortunately none of this cannot be updated as for today.

soltysh
  • 1,464
  • 12
  • 23
0

As a beginning troubleshoot step rename Gemfile.lock (or delete it) and then reinstall your bundle bundle install

Ian Jenkins
  • 109
  • 2
  • 8