Don't ever run bundle update
optimisdev.com
optimisdev.com
Just make sure you do your `bundle update` and then immediately run your test suite and then immediately commit to your repo, before touching any actual code. Mods to Gemfile.lock should always exist in a commit on their own so that you can easily trace any bugs back to dependency upgrades.
If you don't have source control or a test suite, you are fucked. But then you're probably fucked anyway.
One point I was trying to make in the post (maybe made poorly), was that you probably never want to update the entire gem dependency graph in one fell swoop, just for the hell of it.
My read on this is that people tend to do this because they don't fully understand what bundle update is doing when run without any arguments. In the pre-1.0 days, the difference between those commands, at least in my eyes, was extremely ambiguous.
So IMHO, updating all gem dependencies to their latest versions, if only for the purpose of "staying current", usually doesn't make practical sense. Sure, there will be bugfixes included in these updates, but unless they were critical security patches, you can probably live without them, unless those bugs are affecting you directly. Even in that case, I would say the solution would be to run bundle update gem-name, only for that gem.
When I am working on code that is already being used by others and the changes are aimed to be pushed out pretty much as soon as they're 'ready,' I am much more careful and selective about dependency updates.
I'd prefer this b/c it's usually easy to roll back one or two before deploying if they conflict on my laptop, and having a defined version is preferable to blindly going with the latest.
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.
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.
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 ~>
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.
It's not as simple as saying never use it.