Search code examples
ruby-on-railsbundlerruby-on-rails-6

Warning: the running version of Bundler is older than the version that created the lockfile error


When I'm developing/testing, I'm keep getting this error in my console

Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4`.

It's not blocking me at all but bugging me. I know that easiest solution is just updating my Gemfile.lock to this.

BUNDLED WITH
   2.1.2

But I want to solve this permanently. I try to

gem uninstall bundler

and then

gem install bundler -v 2.1.4

It keeps me giving this error

Gem bundler-2.1.2 cannot be uninstalled because it is a default gem

and when I try to first install 2.1.4 and then delete bundler 2.1.2 console gives me this output.

Gem bundler-2.1.2 cannot be uninstalled because it is a default gem
Successfully uninstalled bundler-2.1.4

Is there any solution to this problem? Thanks in advance


Solution

  • Just run gem install bundler:2.1.4, don't worry about the older version that comes with ruby, it should not be used.