We have a gem that contains shared code for multiple apps. It is hosted on a private github repo.
I want each app to automatically grab the latest version of that gem every time bundle install is run, so it is easy for the other members of my team to always be up to date, as well as having a simple deployment on Heroku and our Jenkins CI server.
It is my understanding that when bundle install is run, if some version of the gem has already been successfully installed, it will be used instead of any newer version.
Is there any way to force bundler to always get the latest version of the gem?
Do we just need to make bundle update a regular part of our workflow when we deploy or push to master (triggering a Jenkins run)?
As you said, I believe the update command seems like a better fit for what you are trying to achieve, since you can force the private gem update without affecting unrelated gems.
Per the bundle-update man page:
In your dev environment you could create a bash or other script for running this in tandem with a standard
bundle install.As far as Heroku deploys, once you have updated and committed your Gemfile.lock changes to your git repo, Heroku should use that version, per their docs: