Is it possible to switch from Ruby 1.8.7 to 1.9.2 when restarting a Rails app that is deployed on Passenger? It should be possible to change PassengerRuby in httpd.conf and restarting Apache. I want to know how it can be done without restarting Apache every time.
More info: We have two different apps, one on Rails 2.3.8 and one on 3.0.5 with the same name, and want to switch between them for testing purposes.
Thanks.
Yes you can switch which versions of ruby you use. Life is easy when you use rvm (http://rvm.beginrescueend.com/). Then you can install the passenger gem in different ruby environments, and when you do it in each environment, the
passenger-install-apache2-modulecommand will tell you what to put in the apache config file. For example, mine is now (mac osx – should be similar in other *nixes):I can comment/uncomment the appropriate one and restart apache with the different version of ruby. This also works for ruby 1.9.2 and ruby enterprise edition too.