Reputation: 4388
Let's say I have 2 codebases/git repos. project A and gem B
.
project A uses gem B.
Here is the entry in the project A Gemfile.
gem 'B', git: 'https://yashdfjwehrlhkhklbRrKwgNq:[email protected]/pwa-abcde/B.git', branch: 'dev/B-api'
Now today I made some changes to gem B
and pushed it to git.
But project A
never gets this update as it is already using the old version of the gem.
My main project(A) is hosted in heroku.
Now my doubt is how can I force heroku to fetch the latest changes for the gem?
Upvotes: 0
Views: 134
Reputation: 5444
Instead of running bundle update
within Project A
at Heroku, run bundle update
locally first. This will update your Gemfile.lock
. Test if the Project A
still runs locally as expected.
Then commit and push the new Gemfile.lock
to Heroku.
Upvotes: 0
Reputation: 7366
You can achieve it in below two ways:
set ref
that represent commit hash in your Gemfile instead of branch
name and run bundle install. Now when you push again to heroku it will fetch right commmit.
gem 'B', git: 'https://yashdfjwehrlhkhklbRrKwgNq:[email protected]/pwa-abcde/B.git', ref: 'commmit-hash'
Create new branch for your commit for gem B
changes and set new branch.
This is happening because you didn't pusdev/B-apih any change in Gemfile. Heroku run bundle install
if there is any change in Gemfile
and Gemfile.lock
.
Upvotes: 2