bhoult-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-08 20:40 UTC
Is there a way to specify in the rails application which ruby executable to use.
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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
eden li
2007-May-09 03:29 UTC
Re: Is there a way to specify in the rails application which ruby executable to use.
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 run. 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: #!/usr/local/bin/ruby1.8.4 It should cause mongrel and, subsequently, rails to be run under that version of ruby. On May 9, 4:40 am, "bho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <bho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
bhoult-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-09 13:15 UTC
Re: Is there a way to specify in the rails application which ruby executable to use.
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. On May 8, 10:29 pm, eden li <eden...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 > run. > > 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: > > #!/usr/local/bin/ruby1.8.4 > > It should cause mongrel and, subsequently, rails to be run under that > version of ruby. > > On May 9, 4:40 am, "bho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <bho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Maybe Matching Threads
- Mongrel dying daily with Ruby 1.8.6
- Rails cannot connect error after updating using ruby and rails to slightly newer versions
- Switching the version of Rails that an app uses
- Help in upgrading from 1.1.6 to 1.2.3
- Versions Compatibility and RAILS_GEM_VERSION