So, I’m there with my Rails app, a lot of gems are outdated (like ~50% of them) and of course everybody on the internet is like: “Just run bundle install you fool”. Except that running bundle install updates every single outdated gems and breaks my build in many ways. And I’m not the kind of person who want to keep outdated fixed versions around.

So, why not just update the gems one by one:

  • Run bundle outdated
  • Take the first listed, update that: bundle update great-gem
  • Make sure everything is working with: rake db:reset and rspec spec/features for instance
  • If it’s all good, commit that gem update
  • Otherwise skip this gem and go to the next one

Sounds simple right? And yes it works very well.

So I hacked together a small script I called safe-bundle-install, and it worked well:

safe updating gems

Then this happens:

rake task?

So, let’s do something even better, an open-source gem ;)