The command to see what gems have more recent versions and can be updated is bundle outdated
. This will show you all gems that could be upgraded, but unlike bundle update
, will not actually update your gems (changing Gemfile.lock and installing new gems.)
It will output something like:
$ bundle outdated
Updating git://github.com/panozzaj/andand.git
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Outdated gems included in the bundle:
* ZenTest (4.6.2 > 4.5.0)
* activesupport (3.1.1 > 3.0.9)
* builder (3.0.0 > 2.1.2)
* i18n (0.6.0 > 0.5.0)
* activemodel (3.1.1 > 3.0.9)
* erubis (2.7.0 > 2.6.6)
* rack (1.3.4 > 1.2.4)
* rack-mount (0.8.3 > 0.6.14)
* rack-test (0.6.1 > 0.5.7)
* actionpack (3.1.1 > 3.0.9)
* mail (2.3.0 > 2.2.19)
* actionmailer (3.1.1 > 3.0.9)
* arel (2.2.1 > 2.0.10)
* activerecord (3.1.1 > 3.0.9)
* activeresource (3.1.1 > 3.0.9)
* devise (1.4.2 2a5ad46 > 1.4.2 e76ba05)
* railties (3.1.1 > 3.0.9)
* rails (3.1.1 > 3.0.9)
* sequel (3.28.0 > 3.20.0)
* sinatra (1.3.1 > 1.0)
To break it down, “sinatra (1.3.1 > 1.0)” means that I have version 1.0 and version 1.3.1 is available.
Potential stumbling blocks
Getting a ‘Could not find task “outdated”.’ error message when trying to run bundle outdated
?
At the time of this writing you need to have the right version of Bundler installed with gem install bundler --pre
. This installs Bundler version 1.1.rc, which should also be much faster than earlier versions of Bundler. I would expect this portion of this post to be outdated in the near future.