Why am I seeing errors asking to update my Gemfile.lock?

Issue

When deploying with Ruby your build is failing with the following error:

remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run bundle install elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: The gemspecs for path gems changed
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...

Resolution

If you have already tried committing your Gemfile.lock to git, this error might be related to running a more recent version of bundler.

Please try the steps listed here https://devcenter.heroku.com/articles/bundler-version#bundler-1-15-x to resolve.