I have upgraded ruby version from 2.3.1 to 3.0.2 and also done related changes. On server, after deployment, nginx server cant start and giving error for old version.
I have checked ruby version with login user in ubuntu and rvm list , new 3.0.2 version is set as default version.
Error log:
App 7441 stdout:
App 7441 stdout:
[ E 2021-10-19 03:59:51.9761 5027/T49 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/apprunner/application/current: An error occurred while starting up the preloader.
Error ID: c6399257
Error details saved to: /tmp/passenger-error-J6lyAl.html
Message from application: You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/lockfile_parser.rb:72:in `warn_for_outdated_bundler_version'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/lockfile_parser.rb:59:in `initialize'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/definition.rb:61:in `new'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/definition.rb:61:in `initialize'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/dsl.rb:173:in `new'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/dsl.rb:173:in `to_definition'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/dsl.rb:11:in `evaluate'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/definition.rb:24:in `build'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler.rb:120:in `definition'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler.rb:88:in `setup'
/usr/local/rvm/gems/ruby-2.3.0@application/gems/bundler-1.11.2/lib/bundler/setup.rb:18:in `<top (required)>'
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:456:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:323:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:461:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:322: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:156:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2021-10-19 03:59:51.9814 5027/T7 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-25] Cannot checkout session because a spawning error occurred. The identifier of the error is c6399257. Please see earlier logs for details about the error.
Don't know why error is show version 2.3.0?
How to set ruby version to passenger from rvm?
passenger check ruby command gives two different output: Command: passenger-config about ruby-command
- With Sudo user (rvm command not detected):
root@ip-:/usr/bin# passenger-config about ruby-command
passenger-config was invoked through the following Ruby interpreter:
Command: /usr/bin/ruby2.3
Version: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
To use in Apache: PassengerRuby /usr/bin/ruby2.3
To use in Nginx : passenger_ruby /usr/bin/ruby2.3
To use with Standalone: /usr/bin/ruby2.3 /usr/bin/passenger start
The following Ruby interpreter was found first in $PATH:
Command: /usr/bin/ruby
Version: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
To use in Apache: PassengerRuby /usr/bin/ruby
To use in Nginx : passenger_ruby /usr/bin/ruby
To use with Standalone: /usr/bin/ruby /usr/bin/passenger start
- System user(login user where rvm command detected):
current$ passenger-config about ruby-command
Your RVM wrapper scripts are too old, or some wrapper scripts are missing. Please update/regenerate them first by running:
rvmsudo rvm get stable && rvm reload && rvmsudo rvm repair all
If that doesn't seem to work, please run:
rvmsudo rvm wrapper ruby-3.0.2 --no-prefix --all
Please provide any clue, how to set passenger ruby default version or how to solve this error.