Running apache on ubuntu-20, using chruby with ruby 2.6.6 and 3.0.4 installed. At present, the site starts phusion passenger as follows in the site.conf file:
LoadModule passenger_module /opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14/
PassengerDefaultRuby /opt/rubies/ruby-3.0.4/bin/ruby
</IfModule>
I have an additional version of redmine I wish to run under ruby 2.6.6. In the user account for that redmine, I have a .ruby-version which specifies 2.6.6. When visiting the home page, I get a passenger error:
Gem::MissingSpecVersionError (Gem::MissingSpecVersionError)
/opt/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/dependency.rb:313:in `to_specs'
/opt/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/dependency.rb:323:in `to_spec'
/opt/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/core_ext/kernel_gem.rb:62:in `gem'
<internal:/opt/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:73:in `require'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:380:in `activate_gem'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:544:in `running_bundler'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14//src/helper-scripts/rack-preloader.rb:91:in `preload_app'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14//src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:397:in `run_block_and_record_step_progress'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14//src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14//src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/passenger-6.0.14//src/helper-scripts/rack-preloader.rb:29:in `<main>'
I'm guessing I need to run a separate passenger under ruby 2.6.6 if I want the redmine app itself to run under 2.6.6. Is this correct? If so, can I specify two passengers running from two different ruby versions on the same site? Or do I need a separate site for each one?
Or should passenger, running under ruby 3.0.4, be able to load a redmine running under 2.6.6?