Reputation: 1064
I'm looking to deploy two rails projects. One with Ruby 1.8.7 and Rails 2.3.8, and another with Ruby 1.9.2 and Rails 3.0.1.
I'm trying to set up a situation where www.example.com is Ruby 1.9.2 and shop.example.com is Ruby 1.8.7.
What's the best way to set this up with Passenger and RVM?
Upvotes: 3
Views: 773
Reputation: 79783
There's a blog post explaining pretty much what you want by the phusion people here: http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/
(Actually it's the same info as the link given by Sam - but I think this is the original with clearer layout)
It basically involves running a version of passenger standalone with one version of ruby, and proxying requests to it from apache/nginx that is running the other version.
Upvotes: 3
Reputation: 42863
In terms of rails version it's quite easy because you just need to freeze
(which means store) the rails versions you want in the vendor/rails
dir.
rake rails:freeze:edge RELEASE=2.3.8
And then you can just keep your default at 3.0 or visa versa or freeze both.
In terms of different ruby versions I've never done that. For me it's just less of a headache to have a default and then freeze gems. But here is something that works with what you are doing: http://www.sportscomet.com/sports_thread/view/id-26403
Upvotes: 1