News for hackers. Stuff that matters.
Re:Don't ever run bundle update by ajsharp on Monday January 03, 2011 @04:58PM (#2064856)
That's what bundle update does, with no other arguments. The other way to use it is bundle update gem-name, which will only update the gem passed in and it's dependencies.
Re:Don't ever run bundle update by grandalf on Monday January 03, 2011 @06:49PM (#2065178)
It doesn't update the version numbers in the Gemfile, though, does it? IOW it's only for gems that you haven't locked in a specific version for?

I'd love to be able to ask bundler which of the gems that I have locked in a version for have a newer version available, so that I can test and decide if I should update.

Re:Don't ever run bundle update by ajsharp on Monday January 03, 2011 @07:10PM (#2065237)
No, it won't update the version numbers in your Gemfile. But to be clear, let's assume you have the following in your Gemfile:

    gem "rails", "3.0.0"
    gem "formtastic", ">=1.0.0"
Running bundle update (with no arguments) won't update the rails gem to a more recent version (if it exists), but it will update any of rails' dependencies, if updates exist.

So, rails has a "specific" dependency on actionpack = 3.0.0, and actionpack 3.0.0 has a dependency on erubis ~> 2.6.6. Let's say (hypothetically) the most recent published version of erubis is 2.6.7 (which matches the ~> operator), but the version in your Gemfile.lock is 2.6.6, running bundle update will pull down that new version of erubis 2.6.7.

Similarly, if a newer version of formtastic were available than the one in your Gemfile.lock, bundle update would pull this down as well.

Re:Don't ever run bundle update by grandalf on Monday January 03, 2011 @10:28PM (#2065717)
In general I have varying levels of confidence in whether I want to stay at the latest version of a gem or not.

I also don't want to have to constantly check to see if the gems for which I've fixed the version are the latest... During development I'd be inclined to keep most gems at the latest version (barring the sort of conflict you describe), but once the app is in production I'd be likely to be more cautious, read the changelog, etc., before updating.

It's just that when there are a lot of gems in use, it becomes time consuming to have to cross-reference the lastest version of each gem whose version I have fixed with the latest released version. It seems that Bundler is the natural place for this functionality to live.

Re:Don't ever run bundle update by JonnieCache on Monday January 03, 2011 @08:32PM (#2065451)
The ~> operator is the only one you should really use in your Gemfile version strings. Never >=

See this post by yehuda katz (bundle developer): http://yehudakatz.com/2010/08/21/using-considered-harmful-or...

You can actually use `bundle update` pretty safely with judicious use of ~>

Re:Don't ever run bundle update by JonnieCache on Monday January 03, 2011 @07:00PM (#2065210)
Yes, a `bundle update --pretend` switch or similar would be good.