Multiple versions on a server?

Hey guys,

I’m wondering if it’s possible to run multiple Ruby versions at the same
time in production mode. I got some older Rails apps that need to run in
Ruby 1.8.7 and some newer ones requiring 1.9.1.

How can I run both versions at the same time?

Thanks in advance!

On 11/28/2010 10:03 PM, Heinz S. wrote:

Hey guys,

I’m wondering if it’s possible to run multiple Ruby versions at the same
time in production mode. I got some older Rails apps that need to run in
Ruby 1.8.7 and some newer ones requiring 1.9.1.

How can I run both versions at the same time?

Thanks in advance!

That depends largely on your setup. In the general case, yes, look into
rvm (Ruby Version Manager) for managing that. If your talking via
passenger, then the answer is no(ish), the same passenger process cannot
run multiple versions of Ruby. Without further details on your setup,
that’s really all the help I can give.

Well, I’m using mongrel_cluster and apache to run the applications. Do
you need anything else to know?

I know and use rvm but I didn’t know you can use it with servers?

Try the Ruby Versio Manager:

http://rvm.beginrescueend.com

Just found that .rvmrc thing. Looks like just what I needed :slight_smile: Thanks
guys!

Heinz S. wrote in post #964603:

Well, I’m using mongrel_cluster and apache to run the applications. Do
you need anything else to know?

If you’re using Apache as a proxy to the mongrels, that should be fine.
You can start different mongrels under different versions of ruby.

I know and use rvm but I didn’t know you can use it with servers?

Ruby doesn’t know whether it’s running on a “server” or a “workstation”
:slight_smile: