rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 2k forks source link

You must use Bundler 2 or greater with this lockfile #6784

Closed tz3tzis closed 5 years ago

tz3tzis commented 5 years ago

I try to upload my rails app to heroku but i get this error.

remote: /tmp/d20181113-113-10miq1y/bundler-1.15.2/gems/bundler-1.15.2/lib/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError) From what i understand my bundler version (Bundler version 2.0.0.pre.1) is different than the one in heroku (Bundler 1.15.x)

What can i do to change that? Please help me!

rgaufman commented 5 years ago

I can't seem to use the temp solution. Any ideas?

 ➜  git:(master) ✗ gem list | grep -i bundler
bundler (1.17.2)
➜  git:(master) ✗ gem uninstall bundler
Gem 'bundler' is not installed

Any ideas??

EDIT:

I fixed this by running:

$ gem update --system
$ gem uninstall bundler
$ gem install bundler
# Then in the source directory of my app
$ bundler update --bundler