If you ever have to customize or patch a Ruby gem and you are using Bundler, its a good idea when forking that project to create a branch and then tag new releases.
I found this out recently as I used and patched two Ruby gems, databasedotcom and salesforce_bulk, to sync data to Salesforce for reporting. I ran into showstoppers with both but luckily they are hosted on GitHub so I was able to fork them and make the necessary changes to resolve the issues I encountered while being able to contribute those changes back.
The project Gemfile
was updated with my two forked git branches and then I ran bundle install
. While Bundler does support specifying a git branch I found that as I made further code updates and would run bundle install
again, Bundler wouldn’t download those changes. I figured out that I should be tagging releases of that branch instead as that would require the Gemfile
to be updated with a new tag name. After that running bundle install
would download the latest changes I made.