running ruby 1.8 and 1.9 side by side

0 views
Skip to first unread message

nahum

unread,
Jul 5, 2009, 7:56:58 PM7/5/09
to WellRailed
Hi,

I have a couple of rails apps I want to run on the one server, one is
running an old version of rails and I don't want to touch it, just
leave it using ruby 1.8.7.

The other is a new app that probably works with ruby 1.9.1, so I want
to use that. I've done a bit of a google and not found anything on
using two versions side by side.

Anyone got any easy pointers for that? Is there an env var I can
define stating what set of binaries to use???


Cheers,
Nahum

Tim Haines

unread,
Jul 5, 2009, 8:24:11 PM7/5/09
to WellR...@googlegroups.com
I stumbled on to Multiruby a little while back, but haven't used it -> http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/

Nahum Wild

unread,
Jul 5, 2009, 9:08:58 PM7/5/09
to WellRailed
that seems to be more for maintaining multiple versions of ruby, and
easily testing code against all versions - I've already passed this
point the manual way :-)

I want to run a rails app and specify the version of ruby to use -
which it seems Nginx + Passenger can do (thanks to Carl from YouDo).


Nahum.

Tim Uckun

unread,
Jul 6, 2009, 1:06:12 AM7/6/09
to WellR...@googlegroups.com
>
> Anyone got any easy pointers for that?  Is there an env var I can
> define stating what set of binaries to use???


If you are using ubuntu there are separate packages for ruby1.8 and
ruby 1.9. If you install both of them you will get two binaries ruby
and ruby19. You can launch your applications with ruby or ruby19 using
mongrel or passenger.

If you are not using ubuntu or you want to compile your own ruby you
can compile it ./configure --with-prefix /usr/local/ruby19
--program-suffix=19 this will give you ruby19, rake19, gem19 etc.

That should allow you to run the two versions of ruby side by side.

Reply all
Reply to author
Forward
0 new messages