0

I am working in aws c9 and I am trying to send my app to heroku but it keeps telling me I am running the wrong version of bundler, so I run gem install bundler locally and I get 2.0.1, but on Heroku it keeps running 1.17.1 and I can't change this version.

Dave Slutzkin
  • 1,592
  • 14
  • 19
  • Welcome to Stack Overflow. I don't think there is anything we can do to help you with this. That error appears pretty fatal to me. – Mikkel Jan 07 '19 at 20:15
  • Well there has to be some way to fix as I have restarted my app from the beginning several times now attempting to make it work.... – Donald Lundgren Jan 07 '19 at 21:59

1 Answers1

1

Heroku pin the bundler version for reasons of their own:

The Bundler version on Heroku is carefully curated. A balance needs to be struck between supporting new Bundler features and stability. The work we put into curating the Bundler version ensures maximum stability, and avoids deprecation and notification cycles on Bundler as it changes, or as bugs are fixed or security issues are patched by Heroku.

https://devcenter.heroku.com/articles/bundler-version

They're still on 1.17.1 at time of writing, but that shouldn't generally be a problem.

EDIT

This might be a problem because your local version of bundler is later than that. This is especially the case if you're running bundler 2+ locally, because that creates a Gemfile.lock which won't allow older versions to install from it.

If that's the case then you need to downgrade your local version and rebundle:

local> gem uninstall bundler
local> gem install bundler -v 1.17.1 (or whatever version)
local> rm Gemfile.lock
local> bundle install
Dave Slutzkin
  • 1,592
  • 14
  • 19