I'm trying to deploy a rails app on a VPS. I've already done that but this is the first time I get this error, and I can't find a way to solve it, even though I know what's wrong:
I used RVM to install ruby 2.3.1, and Apache to run the whole thing. I want to use Phusion Passenger to deploy this. So far, all I get is the following error:
cannot load such file -- bundler/setup (LoadError)
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:263:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:366:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:261:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
I read that the problem could come from 2 issues: bundler is not installed, or the ruby version that passenger tries to use isn't correct. Here, passenger tries to use ruby 2.1.0 while I get ruby 2.3.1 when running ruby -v
My question is the following: how can I change which rails version Passenger has to use ?
P.S. : I used this tutorial to get so far, excepted that I installed RVM instead of compiling ruby components myself as described.
Thank you in advance
Aucun commentaire:
Enregistrer un commentaire