views:

241

answers:

4

The Ideal

Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis.

I am aware, from rvm's documentation, that Passenger only works with one Ruby at a time. :(

The Compromise

Failing that, it would be nice to at least be able to concoct a way to be able to assign projects to a Ruby 1.8 or a Ruby 1.9 interpreter. I've read that using Nginx as a reverse proxy allows running Apache and Nginx on the same box. Would it then be possible to have Apache+Passenger using one Ruby, and Nginx+Passenger using a different one? Maybe use something other than Passenger with Nginx?

Am I Barking Up the Wrong Tree?

Am I missing a good solution to this issue? Am I walking into a nightmare configuration situation? Is what I want even viable, or is it necessary to run another box to run a separate Ruby version?

A: 

What about keeping all your projects (or at least those on one server) on the same ruby version? Be it using an old version or upgrading old projects?

I think, this way you have the fewest problems.

Maxem
Because staying on Ruby 1.8 isn't very desirable. And because not everything running on the box is our own, and it's not exactly feasible for us to spend all our time making Redmine 1.9 compatible (for example). Also, at least in the ideal setup, it would be really nice to run projects on the Ruby they were originally written for. I mean, with rvm, the server has these Rubies sitting there, it would be nice to be able to let each project use them!
Legion
A: 

You could use Thin or Unicorn with Nginx. You could than write a god script or some other startup script to set the ruby version per project (or simply start Thin/Unicorn manually).

Konstantin Haase
If you have further questions about RVM, there are people willing to help 24/7 in the #rvm channel on freenode: http://webchat.freenode.net/?channels=rvm.
Konstantin Haase
A: 

The compromise is possible. You can it this a variety of ways but probably the easiest is a reverse proxy combined with as many chrooted ruby+webserver+rails installs as you find convenient.

corprew
+1  A: 

Use multiple small virtual machines?

Justice
If it were me, I'd set up a new VM/slice for 1.9 and migrate apps to that.
wesgarrison