Search code examples
ruby-on-railsrubygemsbundlebundler

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?


Solution

  • I tried this:

    > gem install bundle_outdated
    > bundle-outdated
    Finding outdated gems..
    
    Newer versions found for:
      rails (3.1.0 > 3.0.0)
      haml (3.1.2 > 3.0.0)
      rspec-rails (2.6.1 > 2.0.1)
    
    Lock bundle to these versions by putting the following in your Gemfile:
      gem 'rails', '3.1.0'
      gem 'haml', '3.1.2'
      gem 'rspec-rails', '2.6.1'
    
    You may try to update non-specific dependencies via:
      $ bundle update haml rspec-rails
    
    Handwaving specifications:
      haml: >= 3.0.0
      rspec-rails: >= 2.0.1
    

    Another alternative:

    > gem install gem-outdated
    > gem outdated