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:

[EMAIL PROTECTED] ~ $ 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
[EMAIL PROTECTED] ~ $

I'm not sure whether rake gems:install handles this step; if it does,  
then things are even simpler.

3) Done.

Ben Hoskings


On 15/08/2008, at 2:12 AM, Anthony Ettinger wrote:

>
> 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  
> <[EMAIL PROTECTED]> wrote:
>>
>> 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 Aug 13, 12:23 pm, Ed <[EMAIL PROTECTED]> wrote:
>>> Hello,
>>>
>>> Does anyone have experience running multiple versions of rails on a
>>> single host? Is this even a reasonable suggestion?
>>>
>>> Thanks.
>>>
>>
>
>
>
> -- 
> Anthony Ettinger
> 408-656-2473
> http://anthony.ettinger.name
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to