bundle update and bundle install can all install gems that you specify in the Gemfile but are missing from the gems.
But bundle update does another update:
- If the gems specified in the Gemfile do not have a version, it will be updated to any last.
If the gems specified in the Gemfile have a version with ~> , it will be updated to the last in the last digit , version of the patch.
For example, if you have a gem in a gemfile
'foo_gem', '~> 2.1.0'
bundle update checks if a newer version 2.1.x is available in the cloud. Say your current version is 2.1.2, and the latest in the cloud is 2.1.5, it will install 2.1.5. But if 2.2.6 is the newest, it will not do anything.
Best practice in my opinion
Always add a version to critical stones like rails .
In most cases, stick with bundle install (or bundle , which is install by default). Perform bundle update only when it is really necessary, and you are fully prepared for the result.
Billy Chan May 11 '13 at 11:08 a.m.
source share