rtfminc rtfminc - 1 year ago 64
Ruby Question

will "gem update --system" update rails from 2.3.8 to 3.0?

If'n I had a 2nd computer I would just do it and see - but I've finely tuned this thing to not run 3.0 just yet ... don't want to muck it up. Took hours & hours to get here. Bascially - I want to keep rails at 2.3.8 for a while ... so will

gem update --system

update rails from version 2 -> 3? I did read the docs with no clear answer and am guessing it will, but hey, might learn something new.
Otherwise I update each one (of the 8 - 1) gems that I have.

Answer Source

gem update --system only updates RubyGems.

gem update will update all installed gems to their latest versions, so it will update Rails to 3.0.0.

Before updating the gems you can freeze your application to rails 2.3.8 by executing

rake rails:freeze:gems

in your application folder. Thus your application will be associated and run in rails 2.3.8 environment, even if you update the global gem to rails 3.

You can at any time install a specific rails version via:

gem install rails -v 2.3.8 (or another version of your choice)

This will potentially install multiple gem versions simultaneously, so you can create and develop an app with whichever version you're comfortable with.

Or you can install RVM to create and switch between any number of ruby/rails development environments, e.g. Ruby 1.8.7 with Rails 2.3.9 and ruby 1.9.2 with Rails 3.0.0 and so on.