2

I'm working on a project and we've just updated bundler to version 1.7.0. There was a few days of trouble in getting all the gemfiles/gemfile.locks in a correct state, but I'm still having trouble with one issue in particular.

If there are differences in Gemfile.lock, I check it out, and then bundle so that I will have the gems in the Gemfile. However bundle seems to always auto-upgrade my gems. For example:

Installing multi_json 1.10.1 (was 1.9.2)

The rest of my team is using 1.9.2 - there's a dependency in another part of the application or...who knows. I should be using 1.9.2, but bundler consistently 'auto-upgrades' everytime i run bundle. Is there a way to prevent this behavior? I'm using RVM 1.25.23

dax
  • 10,779
  • 8
  • 51
  • 86
  • Do you have a specific version of the gem defined in your Gemfile? – koffeinfrei Aug 26 '14 at 17:01
  • @koffeinfrei, no. I'm not looking for specific versions, per se, what i want is for gems that are already present to be left alone (not upgraded) – dax Aug 26 '14 at 23:48
  • What I was asking was if you have your gem locked to a specific version in your Gemfile, e.g. `gem 'multi_json', '1.10.1'`. – koffeinfrei Aug 27 '14 at 06:56

2 Answers2

0

Try:

bundle install --frozen

This should prevent bundler to update the Gemfile.lock.

Martin
  • 7,634
  • 1
  • 20
  • 23
0

Bundler 1.7.0 has some bugs which can result in unexpected gem updates. Please try upgrading to the latest version (1.7.2 at the time that I write this).

See:

Tim Moore
  • 8,958
  • 2
  • 23
  • 34