Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you preview the updates that a "Bundle Update" will make?

Sometimes I want to run bundle update but only to see which gems need updating. I don't necessarily want to deal with the issues associated with updating all of them but I want to do a quick check to see what's the state of the art.

Is there a way to simply get Bundler to list the gems that need to be updated together (ideally) with the version I'm currently running and what's the latest and greatest?

like image 939
Peter Nixey Avatar asked Sep 01 '11 11:09

Peter Nixey


People also ask

What is the difference between bundle install and bundle update?

bundle update and bundle install can both install the gems you specified in Gemfile but missing in gems. But bundle update does one thing more to upgrade: If the gems specified in Gemfile don't have version, it will upgrade to whatever latest.

How do I update a gem to a specific version bundle?

The correct way to update the version of a gem to a specific version is to specify the version you want in your Gemfile, then run bundle install . As for why your command line was failing, there is no -version option.


1 Answers

There is now a way to do this directly with bundler. You do not need to install any extra gems.

bundle outdated

will return something like this

Outdated gems included in the bundle:
  * acts-as-taggable-on (2.4.1 > 2.3.3)
  * addressable (2.3.4 > 2.3.3)
  * arel (4.0.0 > 3.0.2)
  * better_errors (0.8.0 > 0.7.2)
  * builder (3.2.0 > 3.0.4)
  * capybara (2.1.0 > 2.0.3)
  * chunky_png (1.2.8 > 1.2.7)
  * codemirror-rails (3.12 > 3.02)
  * coffee-rails (4.0.0 > 3.2.2)
  .....
like image 67
Ryan Avatar answered Oct 06 '22 20:10

Ryan