All threads / "You must use Bundler 2 or greater..." Error

Ask A Question

Notifications

You’re not receiving notifications from this thread.

"You must use Bundler 2 or greater..." Error

Nelson Casanova asked in Rails

rails -v
Rails 5.2.3
ruby -v
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
bundler -v
Bundler version 2.0.1

On creating a new app and trying rake db:create i get: You must use Bundler 2 or greater with this lockfile. even after deleting the lockfile and re-running bundle install or bundle update I get the same thing. The only way to make it work is to run bundle exec rake db:create. But then, to run migrations it will just keep getting the same error message.

Any ideas?

Try upgrading to Ruby 2.6.3 (it's the latest version anyways).

There was an issue in Ruby core that they mentioned here in this discussion about the issue. https://github.com/bundler/bundler/issues/6937

This Bundler 2 stuff has been an absolute mess.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 35,699+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.