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?

Reply

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.

Reply
Join the discussion
Create an account Log in

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

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

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