2

It causes so many deployment issues it's ridiculous. Most of the time I don't care what version of gems are used, just want to use the latest one.

UPDATE in response to comments:

Here are a couple of examples off the top of my head:

  1. developer A is using a pre-release of a gem so when he runs 'bundle update', the Gemfile.lock is messed up for everyone else and if you deploy it, there goes your site.
  2. A bug in a gem gets fixed so we run gem update across our servers, restart rails and yay, bug fixed! Oh, but wait, it's not fixed? Thanks bundler. What should have been an easy fix is now a full code deploy across our servers.

That's just a couple off the top of my head. At least let us decide if we want to lock in gem versions or perhaps at least allow a range of versions for instance any 2.X version.

UPDATE 2: And yet another issue when there are windows developers on the team

Here is what's showing up in a windows Gemfile.lock:

nokogiri (1.4.4)
nokogiri (1.4.4-x86-mingw32)

Wow, this is just awesome. Sure makes for easy teamwork and deployment.

Travis Reeder
  • 38,611
  • 12
  • 87
  • 87
  • 3
    You're free to just require stuff as you like, **but don't**. Learn to use and like bundler and you'll be much happier in the long run. Using the latest version of a gem is fine for development, but for production -- unless perhaps you are the only one using the site -- you can and should care what version you are using. Using the latest, whatever it happens to be, is a recipe for subtle breakage. – Brian Donovan Dec 28 '10 at 07:00
  • 3
    What issues are you having with it? You don't have to specify versions; bundler is good at resolving versioning conflicts that "just install the latest" would otherwise cause. RVM + gemsets + bundler is fairly bulletproof as far as deployment goes, in my experience. – Chris Heald Dec 28 '10 at 07:02
  • Bundler is the opposite of annoying. You can go get some coffee when you run it. – fivetwentysix Dec 28 '10 at 07:35
  • 1
    Bundler rocks. If you don't like it you are using it wrong. – Kevin Sylvestre Dec 28 '10 at 19:48
  • @fivetwentysix I do like that it gives you time to get coffee whenever you run it. ;) – Travis Reeder Dec 28 '10 at 19:54
  • "At least allow a range of versions for instance any 2.X version": gem "annotate", "~> 2" – Heikki Dec 28 '10 at 22:58
  • More docs here: http://gembundler.com/gemfile.html – Heikki Dec 28 '10 at 22:59
  • Running cygwin is a good solution as far as the windows/nokogiri example goes (a problem I personally encountered) – JackCA Jan 09 '11 at 05:39
  • I'm with you -- bundler is a piece of s#1t. It needs to die in a fire. – womble Mar 04 '11 at 08:23
  • Life sucked before bundler, and it sucks after. Wish there were some real answers about removing it from rails. – Kevin Aug 16 '12 at 21:45

2 Answers2

2

I recommend starting to use two techniques with your development and deployment:

Specify version number of gems in your gemfile.

For example:

gem "rails", "3.0.1"
gem "will_paginate", "~> 3.0.pre2"

This way, when you decide you want to update rails, or will_paginate, change the version numbers in your gemfile.

Only update certain gems

Rather than the generic bundler update command, run

bundler update rails

This will only update the rails gem to the newest version, rather than get the latest of all gems.

If you use both 1 & 2, you'll have a happier experience.

Jesse Wolgamott
  • 40,197
  • 4
  • 83
  • 109
0

Then, simply, don't check your Gemfile.lock into source control. All of the specific problems you listed are solved.

Of course, you are sacrificing the enormous advantage that Bundler gives you over any other dependencies management system.

yfeldblum
  • 65,165
  • 12
  • 129
  • 169