Topic: RAILS_GEM_VERSION seems not to work (?)

I upgraded my local version of rails to 1.2.1

Doing a 'gem list' shows that the following rails versions are available on my machine 1.2.1, 1.1.6.5618, 1.1.6

I have an app that i would like to run under 1.1.6 so i tried setting RAILS_GEM_VERSION in its environment.rb (and restarting), but running 'Rails::Info' in the console (under that aplication) shows that 1.2.1 is still being used.

At the moment i've resorted to doing it in the following way (which works) but i'd like to understand why RAILS_GEM_VERSION seems to be getting ignored.

require 'rubygems'
require_gem 'rails', '1.1.6'

# This next line doesnt seem to have any effect
#RAILS_GEM_VERSION = '1.1.6'


If anyone can shed any light on this i'd be very grateful.

(i know that freezing rails to the vendor directory might often be a better choice, but i'm still curious about this not working)..

Last edited by cbit (2007-01-29 09:24:47)

Re: RAILS_GEM_VERSION seems not to work (?)

I hope you have commented out line five:

    require 'rubygems'
    require_gem 'rails', '1.1.6'
     
    # This next line doesnt seem to have any effect
    RAILS_GEM_VERSION = '1.1.6'

just to be shure...

Last edited by Dieter Komendera (2007-01-29 11:53:44)

My homepage: http://www.komendera.com/
Working at: http://www.abloom.at/
My blog: soaked and soaped http://soakedandsoaped.com/

Re: RAILS_GEM_VERSION seems not to work (?)

yes, i had deliberately commented out that line after it seemed not to work.