Is there a way to freeze Rails _after_ the fact?

I’ve got a managed VPS (the hosting service provides support) and they
just did an unannounced upgrade to Rails 2.0. My app is 1.2.x. Is
there a way to freeze Rails and the other gems my app needs to a prior
version after the fact? I’m really in a bind here.

Thanks,
Bill

On 25.5.2008, at 21.48, Bill W. wrote:

I’ve got a managed VPS (the hosting service provides support) and
they just did an unannounced upgrade to Rails 2.0. My app is
1.2.x. Is there a way to freeze Rails and the other gems my app
needs to a prior version after the fact? I’m really in a bind here.

You should have this line in your config/environment.rb:

#RAILS_GEM_VERSION = ‘1.2.3’ unless defined? RAILS_GEM_VERSION

Just uncomment it and set it to whatever version you want to use. Of
course, that gem version must still exist on the system but normally
updating gems doesn’t remove old versions. Note that you should imho
ALWAYS set RAILS_GEM_VERSION unless you have frozen gems (or edge) to
your app’s vendor directory. Otherwise you will forever be at the
mercy of your host messing with the gems.

Cheers,
//jarkko

-~----------~----~----~----~------~----~------~–~—


Jarkko L.

http://www.railsecommerce.com
http://odesign.fi

On 25 mai, 14:48, “Bill W.” [email protected] wrote:

I’ve got a managed VPS (the hosting service provides support) and they just did an unannounced upgrade to Rails 2.0. My app is 1.2.x. Is there a way to freeze Rails and the other gems my app needs to a prior version after the fact? I’m really in a bind here.

Yup! Sure do :slight_smile:

$ sudo gem install piston
$ piston import
http://dev.rubyonrails.org/svn/rails/branches/1-2-stable/
vendor/rails

Or use the old trick of svn export (which is essentially what Piston
does). Since you’re on 1.2, you won’t need Piston 1.9+ (will be 2.0
at some point) which can import from Git repositories.

More info on Piston at http://piston.rubyforge.org/

Bye !
François Beausoleil

Thanks, Francois. I appreciate the help!

Best regards,
Bill

francois.beausoleil wrote: