What to set passenger_root and passenger_ruby paths when using RVM or rbenv

If you’re using Rails, Nginx, Passenger and RVM or rbenv and wondering what to set the passenger_root and passenger_ruby paths to in nginx.conf, here’s how to get them. Keep in mind, you’ll have to do this by reconfiguring Nginx if you switch from RVM to rbenv or vice-versa.

First you must install the passenger gem in your project directory:

cd to your rails project directory
gem install passenger

To get the passenger_root path:

cd to your rails project directory
passenger-config --root  

To get the passenger_ruby path:

cd to your rails project directory
rbenv which ruby  
VN:F [1.9.22_1171]
Rating: 2.8/5 (8 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 4 votes)
What to set passenger_root and passenger_ruby paths when using RVM or rbenv, 2.8 out of 5 based on 8 ratings
Facebook Twitter Email

Leave a Reply