Openshift doesn't install bcrypt

1.2k views Asked by At

I'm trying to push my Ruby on Rails app to OpenShift but something is going wrong with the gem file bcrypt. Everything is ok locally, just when I try to run on the Openshift side this error occur.

No such file to load -- bcrypt (LoadError) /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in require' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:inblock in require' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in load_dependency' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:inrequire' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activemodel-4.1.1/lib/active_model/secure_password.rb:49:in has_secure_password' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/app/models/user.rb:13:in' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/app/models/user.rb:1:in <top (required)>' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:inrequire' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in block in require' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:inload_dependency' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in require' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:348:inrequire_or_load' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:307:in depend_on' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:225:inrequire_dependency' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/engine.rb:468:in block (2 levels) in eager_load!' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/engine.rb:467:ineach' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/engine.rb:467:in block in eager_load!' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/engine.rb:465:ineach' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/engine.rb:465:in eager_load!' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/engine.rb:346:ineager_load!' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/application/finisher.rb:58:in each' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/application/finisher.rb:58:inblock in ' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/initializable.rb:30:in instance_exec' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/initializable.rb:30:inrun' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/initializable.rb:55:in block in run_initializers' /opt/rh/ruby200/root/usr/share/ruby/tsort.rb:150:inblock in tsort_each' /opt/rh/ruby200/root/usr/share/ruby/tsort.rb:183:in block (2 levels) in each_strongly_connected_component' /opt/rh/ruby200/root/usr/share/ruby/tsort.rb:219:ineach_strongly_connected_component_from' /opt/rh/ruby200/root/usr/share/ruby/tsort.rb:182:in block in each_strongly_connected_component' /opt/rh/ruby200/root/usr/share/ruby/tsort.rb:180:ineach' /opt/rh/ruby200/root/usr/share/ruby/tsort.rb:180:in each_strongly_connected_component' /opt/rh/ruby200/root/usr/share/ruby/tsort.rb:148:intsort_each' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/initializable.rb:54:in run_initializers' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/railties-4.1.1/lib/rails/application.rb:288:ininitialize!' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/config/environment.rb:5:in <top (required)>' config.ru:1:inrequire' config.ru:1:in block in <main>' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval' /var/lib/openshift/548f13fce0b8cdf18c000001/app-root/runtime/repo/vendor/bundle/ruby/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize' config.ru:1:innew' config.ru:1:in <main>' /opt/rh/ruby200/root/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-loader.rb:78:ineval' /opt/rh/ruby200/root/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-loader.rb:78:in load_app' /opt/rh/ruby200/root/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-loader.rb:96:in' /opt/rh/ruby200/root/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-loader.rb:4:in <module:PhusionPassenger>' /opt/rh/ruby200/root/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-loader.rb:3:in'

My latest gem file:

source 'https://rubygems.org'
...
gem 'bcrypt'
gem 'bcrypt-ruby'
...

My Gemfile.lock includes all dependencies required.

An important fact to know is that the Openshift console after push modifications doesn't install the gem files bcrypt and bcrypt-ruby. Follow the optput

remote: Stopping Ruby cartridge
remote: Repairing links for 1 deployments

remote: Force clean build enabled - cleaning dependencies
remote: Building git ref 'master', commit cab854c
remote: Building Ruby cartridge
remote: bundle install --deployment --path ./app-root/repo/vendor/bundle
remote: NOTE: You can prevent installing certain Gemfile group using: rhc env set
BUNDLE_WITHOUT=groupname
remote: Fetching gem metadata from https://rubygems.org/........
remote: Installing rake (10.4.2)
remote: Installing i18n (0.6.11)
remote: Installing json (1.8.1)
remote: Installing minitest (5.5.0)
remote: Installing thread_safe (0.3.4)
remote: Installing tzinfo (1.2.2)
remote: Installing activesupport (4.1.1)
remote: Installing builder (3.2.2)
remote: Installing erubis (2.7.0)
remote: Installing actionview (4.1.1)
remote: Installing rack (1.5.2)
remote: Installing rack-test (0.6.2)
remote: Installing actionpack (4.1.1)
remote: Installing mime-types (1.25.1)
remote: Installing polyglot (0.3.5)
remote: Installing treetop (1.4.15)
remote: Installing mail (2.5.4)
remote: Installing actionmailer (4.1.1)
remote: Installing activemodel (4.1.1)
remote: Installing arel (5.0.1.20140414130214)
remote: Installing activerecord (4.1.1)
remote: Installing execjs (2.2.2)
remote: Installing autoprefixer-rails (4.0.2.1)
remote: Installing sass (3.2.19)
remote: Installing bootstrap-sass (3.3.1.0)
remote: Installing bootstrap_form (2.2.0)
remote: Installing childprocess (0.5.5)
remote: Installing coffee-script-source (1.8.0)
remote: Installing coffee-script (2.3.0)
remote: Installing thor (0.19.1)
remote: Installing railties (4.1.1)
remote: Installing coffee-rails (4.0.1)
remote: Installing hike (1.2.3)
remote: Installing multi_xml (0.5.5)
remote: Installing httparty (0.13.3)
remote: Installing multi_json (1.10.1)
remote: Installing jbuilder (2.2.5)
remote: Installing jquery-rails (3.1.2)
remote: Installing mysql2 (0.3.17)
remote: Using bundler (1.3.5)
remote: Installing tilt (1.4.1)
remote: Installing sprockets (2.11.0)
remote: Installing sprockets-rails (2.2.2)
remote: Installing rails (4.1.1)
remote: Installing rdoc (4.2.0)
remote: Installing rubyzip (0.9.9)
remote: Installing sass-rails (4.0.5)
remote: Installing sdoc (0.4.1)
remote: Installing websocket (1.0.7)
remote: Installing selenium-webdriver (2.35.1)
remote: Installing turbolinks (2.5.3)
remote: Installing uglifier (2.6.0)
remote: Installing validates_cpf_cnpj (0.2.0)
remote: Cannot write a changed lockfile while frozen.
remote: Your bundle is complete!
remote: It was installed into ./vendor/bundle
remote: Post-install message from httparty:
remote: When you HTTParty, you must party hard!
remote: Post-install message from rdoc:
remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:
remote: <= 1.8.6 : unsupported
remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote: >= 1.9.2 : nothing to do! Yay!
remote: Preparing build for deployment

Clearly the error is because the gem files are not installed, but the question is why?

0

There are 0 answers