Hi there, How do IÂ make my app pick up the new Rails gem that I have just updated? I have: 1. just updated rails from version 2.1.0 to version 2.3.2 (console: "rails -v" -> "Rails 2.3.2") 2. in environment.rb set: "RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION" 3. restarted the server Result: - The Console in Eclipse tells me "=> Rails 2.1.0 application started on http://127.0.0.1:3000" Even if I a) totally uncomment "RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION" (in environment.rb), or b) uncomment only "unless defined? RAILS_GEM_VERSION" (in environment.rb), Eclipse tells me the same thing (after having restarted the server). Plus: I haven't found any system environment variable called "Rails" (or similar), using "printenv" in the Linux console. What's going on here? How can I make my app use the new 2.3.2 rails gem? Thanks a lot for your help! Tom
on 2009-03-18 16:05
on 2009-03-18 16:14
On Mar 18, 2:05 pm, Tom Ha <email@example.com> wrote: > Hi there, > > How do I make my app pick up the new Rails gem that I have just updated? > Is rails vendored into your app ? (ie does vendor/rails exist ?) Fred
on 2009-03-18 16:20
> 2. in environment.rb set: "RAILS_GEM_VERSION = '2.3.2' unless defined? > RAILS_GEM_VERSION" rake rails:update then run all your tests... (-;
on 2009-03-18 16:21
Yes, I have a "rails" folder in "vendor". What's the conclusion from this? (And: should I have it elsewhere instead? If yes, where and why? And how would I do that?)
on 2009-03-18 16:23
PS:Â "rake rails:update" unfortunately didn't change the situation...
on 2009-03-18 17:17
Ok, got it working, here's what the problem was: - you can have Rails either in "vendor" or elsewhere on your system, e.g. in "/usr/lib/ruby/gems/1.8/gems" (or in both places) - the file config/boot.rb checks if there is a version in "vendor" and prefers this one over the one that's NOT included in your app In my case, - I had different versions in both places, and - the one in "vendor" was the old one, so I just deleted it and my app now picks up the newer/updated one in "/usr/lib/ruby/gems/1.8/gems" Thanks for your hint, Fred!
on 2009-03-18 17:26
On 18 Mar 2009, at 14:21, Tom Ha wrote: > > Yes, I have a "rails" folder in "vendor". > > What's the conclusion from this? if you have such a folder then your app uses the version of rails in there and ignores any installed gems (you don't even need the gems installed at all) Fred