gemlock and rails version

Trying to understand how the version of rails is handled in the gem file, if you do:

gem “rails”

and call bundle, it from what I understand will pull down the latest stable release right?

And then a gemlock file is created, which will contain the version number so any future calls to bundle will get the same version (it will just be ignored).

So if you want to upgrade you have to delete the gemlock line with rails right?

Trying to understand how the version of rails is handled in the gem file, if you do:

gem “rails”

and call bundle, it from what I understand will pull down the latest stable release right?

And then a gemlock file is created, which will contain the version number so any future calls to bundle will get the same version (it will just be ignored).

So if you want to upgrade you have to delete the gemlock line with rails right?

You can just run “bundle update” to update all the gems to the latest version.

You can also specify a specific version of a gem in your Gemfile with:

gem rails “3.2.3”

Running bundle install will then install that specific version.

You don’t need to every really worry about touching the lock file - bundler will handle that for you.

To add to that Jeremy said, you could use:

bundle update rails

To update just rails.