About this question

Answers: 2

User answered: 2

Total Votes: 2

Question from TS Lim

Photo
Answered

How to run Rails 2/3 together with Rails 3.1?

Most of our sites are built using Rails 2.x and Rails 3.0.x. With the changes in Rails 3.1 like assets pipeline-ing etc, it seems quite a task to have all the different Rails app versions running together in a single server.

On development, I'm using RVM & Pow to maintain different ruby versions/gem sets for the apps. I suppose we have similar option for production environments.
Answered 10 months ago | Asked 10 months ago

Answers

Isaac-4-cropped
Accepted
2
For production environments, it's actually a similar concept to using RMV & Pow. The difference being Pow being substituted for a proper web server like Passenger Standalone, mongrel, Thin, Unicorn or something similar.  Then having a front end reverse proxy/load balancer server to direct traffic to the correct web server handing it. Using this way with RVM, you can have any combination of ruby version & rails version all nicely running independently of each other.

As an example, we use Apache web server as a reverse proxy at the front. Then at the back we run Passenger Standalone independently for each app we have.  Here's the explanation for it from the creators of Passenger.

Rails 3.1 is a major step forward but at the same time it broke a lot of things. One of it is ruby compatibility, it only works with ruby 1.9 above, giving me a major PITA since our servers were running ruby 1.8.7 nicely all this while.
Answered 10 months ago | Accepted 10 months ago
Avatar
0
I'm on Linux, so RVM is a must. Pow is awesome (only it's for Mac OS).
Answered 10 months ago