Forum: Ruby on Rails Is there a way to specify in the rails application which rub

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0921e97a9274698490d8c4c2e68bdcfb?d=identicon&s=25 Brandon Hoult (bhoult)
on 2007-05-08 22:41
(Received via mailing list)
Basically I am stuck with a production app running on Rails 1.1.6
needing ruby 1.8.4, while we are working in trunk on getting Rails
1.2.3 working which needs ruby 1.8.6.  I can set the version of rails
using RAILS_GEM_VERSION in environment.rb ... but where can I set the
version of ruby to use?
8bc543795b502900b5333aea73ad5533?d=identicon&s=25 Eden Li (edenli)
on 2007-05-09 05:30
(Received via mailing list)
How are you serving up your rails app?  If you use mongrel, you'll
need to patch up or copy and patch up /usr/bin/mongrel_rails.  Change
the bang line to point to the binary of the version ruby you want to

For example, if you installed ruby 1.8.4 with its binary at /usr/local/
bin/ruby1.8.4, then change the first line to:


It should cause mongrel and, subsequently, rails to be run under that
version of ruby.
0921e97a9274698490d8c4c2e68bdcfb?d=identicon&s=25 Brandon Hoult (bhoult)
on 2007-05-09 15:16
(Received via mailing list)
Thanks for the tip.

We are using mongrel.  The issue is more on our development boxes
though.  We have to do updates on the old version until the 1.2.3
version has had a chance to be tested and is stable, which means
switching back and fourth a lot.  I think I can probably modify script/
server as you suggested and maybe patch rake if that is necessary.
Another possibility is to put a symlink to the correct ruby executable
in subversion in the app directory and rewrite all the #! lines to
point to that.

I had hoped that there might be an "official" way to do this as I can
see it happening frequently as ruby/rails changes.
This topic is locked and can not be replied to.