From running gemset dir:
$ passenger-config --ruby-command
It will tell you the ruby path for Apache and Nginx.
Command: /home/deric/.rvm/wrappers/ ruby-2.0.0-p247@my _gemset/ruby Version: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] To use in Apache: PassengerRuby /home/deric/.rvm/wrappers/ ruby-2.0.0-p247@my _gemset/ruby To use in Nginx : passenger_ruby /home/deric/.rvm/wrappers/ ruby-2.0.0-p247@my _gemset/ruby
Nginx: For Passenger 4, you can specify several ruby versions. Therefore, for a specific server configuration:
your_site.conf:
server { listen 80; root /home/aaron/web/public; passenger_enabled on; passenger_ruby /home/aaron/.rvm/wrappers/ ruby-2.0.0-p247@your _gemset/ruby; }
nginx.conf: (this works for the new passenger 4.0.17)
http { passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini; }
Just run from your gemset dir this:
$ passenger-status
It will check if passenger_native_support.so is available. Depending on your RVM installation, you may need to run it using rvmsudo
$ rvmsudo passenger-status
Debian / Ubuntu now has nginx binary packages available for passengers , which greatly simplifies installation.
Tombart
source share