Hello, Does anyone have experience running multiple versions of rails on a single host? Is this even a reasonable suggestion? Thanks.
on 13.08.2008 22:12
on 13.08.2008 22:14
I run multiple Rails version on my server, by specifying the version my app requires in the environment.rb file, I have no issues. The alternative (which I usually do) is to freeze the Rails version that your app uses to the vendor folder. Hope that helps. -- Jamie van Dyke -- Parfait
on 14.08.2008 13:23
Ed,
Follow Jamie's advice, not only it is possible and reasonable, but
Rails is designed to support this feature. Buy the Obie's Rails Way
and check the first chapter where he explains how a Rails application
is initialized, later continue with rest of the book ;-)
Bests regards,
--
Aníbal Rojas
http://hasmanydevelopers.com
http://rubycorner.com
http://anibal.rojas.com.ve
on 14.08.2008 18:13
Are there any good references of what the freeze process is used for, and why? I found the Deployment book to fall a little short on freezing. I've tried freezing, and it appears to have deleted everything in the path, when I do an svn update, I get it all back. Also, the architecture of deployment with respect to ruby (and also rails) independtly. I'm a little confused on where the framework lives, is the Rails version I use part of my deployment, or is that provided by the ISP on their server? I'm pretty sure I'm stuck with whatever ruby version they install, unless I install my own. On Thu, Aug 14, 2008 at 4:23 AM, Aníbal Rojas <anibalrojas@gmail.com> wrote: > -- >> >> Thanks. > > > -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name
on 15.08.2008 15:51
Anthony, On Aug 15, 11:12 am, "Anthony Ettinger" <ettin...@gmail.com> wrote: > Are there any good references of what the freeze process is used for, and why? $ rake -D rails:freeze:edge (in /home/anibal/sandboxes/cb-claimchaser-trunk) rake rails:freeze:edge Lock to latest Edge Rails, for a specific release use RELEASE=1.2.0 $ rake -D rails:freeze:gems (in /home/anibal/sandboxes/cb-claimchaser-trunk) rake rails:freeze:gems Lock this application to the current gems (by unpacking them into vendor/rails) If you have have in your development box different rails applications tied to different rails versions you will need to freeze so each application uses the freezed rails version under vendor/rails folder. If you don't have control on what rails gems are installed you should not take chances and freeze rails before ever thinking on deploying. > I found the Deployment book to fall a little short on freezing. > > I've tried freezing, and it appears to have deleted everything in the > path, when I do an svn update, I get it all back. Please add more info here. > Also, the architecture of deployment with respect to ruby (and also > rails) independtly. These are two different things,it would be unusual having trouble with your Ruby version. > I'm a little confused on where the framework lives, is the Rails > version I use part of my deployment, or is that provided by the ISP on > their server? When a Rails based applications initializes it can use a a specific Rails version available as a gem, or use the same libraries located under vendor/rails > I'm pretty sure I'm stuck with whatever ruby version they install, > unless I install my own. if you are not running your own VPS or Dedicated Server, I would not recommend trying to install your own Ruby version, it requires building from source, fixing paths for the build and setting up environment variables, it is possible, but it is a lot of work if you don't have the skills. Good luck, -- Aníbal Rojas http://hasmanydevelopers.com http://rubycorner.com http://anibal.rojas.com.ve
on 06.11.2008 17:48
Freezing isn't the best way, there's a much simpler method. 1) Define the version of Rails your app requires in config/ environment.rb. For example, one of the apps I've worked on this week has RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION 2) For each app you're running on the server, install that version's gem to the system like normal. For the above app, I'd do a sudo gem install rails --version='2.1.2' The app then selects the correct gem when it is started. You can have as many different versions of Rails installed to the system gem path as you like: ben@zaphod ~ $ ls -1d $GEMS/rails* /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.5 /opt/local/lib/ruby/gems/1.8/gems/rails-2.0.2 /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.0 /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.1 /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2 /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.0 ben@zaphod ~ $ I'm not sure whether rake gems:install handles this step; if it does, then things are even simpler. 3) Done. Ben Hoskings
on 07.11.2008 03:31
I'm using GIT to keep all Rails versions and I'm exporting the needed one in proj/vendor/rails: http://tt.zhekov.net/post/51803697/switching-between-several-rails-versions