After reading up on the bundler project about "conservative updating" this, bundle_nice.sh
above, appears to be the suggested workflow for updating Just the Gems You Have To:
gem list -r --all $X
to get the latest version of whatever gem you want.- Edit Gemfile to add a new '=' version constraint for that gem.
- Edit Gemfile.lock to relax the locked constraint for that gem, up to the new version. Dependencies (
gem specification $X -v $version
) will be updated bybundle install
andbundle check
in the Gemfile.lock automatically. - Run
bundle install
to conservatively update the dependency graph, and Gemfile.lock. - Remove the constraint from the Gemfile, and run
bundle check
to update the Gemfile.lock with the removed constraint without installing new gems. - whew.
Below is a log of those actions, along with git diff
interspersed for clarity.