Today I Learned

hashrocket A Hashrocket project

Point the Gemfile.lock to a new branch version

One very flexible option for gluing your softwares together is to point a gem to a branch on Github in your Gemfile like so:

gem 'fancy_addition', github: 'chriserin/fancy_addition', branch: 'double_add'

But that reference is locked to a specific version of your branch in the Gemfile.lock

remote: git://github.com/chriserin/fancy_addition.git
revision: dca3f25fa294ee68b41b2c736064e5e200039b6d
branch: double_add

If you update that branch, the repository that depends on it will not automatically receive that update. To update the Gemfile.lock reference to the most recent version of that branch use the --source option of bundler like so:

bundle update --source double_add
See More #ruby TILs
Looking for help? Each developer at Hashrocket has years of experience working with Ruby applications of all types and sizes. We're an active presence at Ruby conferences, have written some of the most popular gems, and have worked on many of the web's Ruby on Rails success stories. Contact us today to talk about your Ruby project.