nginx Passenger Shell Logins && Associated Errors

Ya it's still tripping up on the ruby versions.

Code:
        passenger_ruby                          /usr/local/bin/ruby24;
#        passenger_ruby                          /home/rich/.rbenv/shims/ruby;

The second one is the ruby I want to be using, the first is the ruby you said I should be using. It isn't managed by rbenv at all, so it has no gems nor Gemfile. Is this an issue with this new FLAVORS layer? It's taken away the ability to provide a Gemfile, or a chosen version for that matter.

Code:
Error: The application encountered the following error: cannot load such file -- bundler/setup (LoadError)
    /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:59:in `require'
    /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:59:in `require'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:363:in `activate_gem'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:527:in `running_bundler'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/helper-scripts/rack-preloader.rb:91:in `preload_app'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
    /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.4/src/helper-scripts/rack-preloader.rb:29:in `<main>'
 
I've found it best to use Gems provided by ports/packages. Using rbenv might be a quick and easy solution for a local install but if you have to push it out to a bunch of webservers it'll quickly become an unmanageable mess.

Looking at your previous posts, if you really want to use Ruby 2.5 instead of 2.4 you can switch the default Ruby version by adding to /etc/make.conf:
Code:
DEFAULT_VERSIONS+= ruby=2.5
But you will have to (re)build all things Ruby from ports.
 
So even bundler should be discarded. So how can I add Gems, given I have a list of them? It's strange that this Passenger install has taken control of a ruby installation. Seems things have changed in the past year.
 
So it was nginx that was calling for bash. I was instructed to shove that path inside the nginx startup.

PATH=$PATH:/usr/local/bin inside /usr/local/etc/rc.d/nginx did the trick. But that revealed I have two Passengers.

Code:
  You are currently validating against Phusion Passenger 5.3.4, located in:

     /usr/local/lib/ruby/gems/2.5/gems/passenger-5.3.4/bin/passenger

   Besides this Passenger installation, the following other
   Passenger installations have also been detected:

     /usr/local/bin/passenger

   Please uninstall these other Passenger installations to avoid
   confusion or conflicts.

The latter is apparently the one I need to delete, but I can't tell how it got there. pkg info only shows the rubygem-passenger-nginx port installed.


ruby-2.5.1_3,1 Object-oriented interpreted scripting language
ruby-build-20180601 Compile and install different ruby versions
ruby25-gems-2.7.7 Package management framework for the Ruby language
rubygem-passenger-nginx-5.3.4 Modules for running Ruby on Rails and Rack applications
rubygem-rack-2.0.5,3 Rack, a Ruby Webserver Interface
rubygem-rake-12.3.1 Ruby Make


Should I rename that latter Passenger?
 
Back
Top