I have some production Rails 2 apps. I want to start using Rails 3 and Ruby 1.9 for new apps I develop.
I’m using Passenger and Apache with REE (Ruby 1.8.7). I don’t vendor anything — I install gems on the system level and specify versions per app in environment.rb.
If understand it right, the problem is not so much the Rails and other gem versions (because each app can specify their own in environment.rb), but whether my Rails 2 apps and their gems will run under Ruby 1.9.
Do I have that right?
Based on Googling it appears that there may actually be a problem with some gems like Searchlogic and Ruby 1.9.
If so what would be the recommended solution?
I have looked into RVM and it looks fantastic for testing, experimentation, and development. But it doesn’t look like it was designed help with a production setup.
As I understand it, when you install Passenger you compile it against one particular version of Ruby. That Ruby can be under RVM no problem, but Passenger can’t use different Rubies for different apps.
Look into RVM (Ruby Version Manager). You can manage multiple ruby versions on the same box, and multiple gemsets for each.
http://beginrescueend.com/
Additionally, Bundler allows projects to maintain their own libraries of gems (and for me at least, obviates the need for using RVM gemsets)
http://gembundler.com/
Check the following link for Hongli Lai from Phusion explaining how to set up Passenger running on multiple versions of Ruby simultaneously by using Passenger standalone and reverse proxy.
http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/