Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 269
Semih Arslanoglu Avatar asked Mar 11 '20 08:03

Semih Arslanoglu


People also ask

How do I check my bundle version?

To view this information: Open the App bundle explorer page (Release > App bundle explorer). Select the version filter near the top right of the page. On the “Choose a version” table, select the right arrow on the version that you want to view.

How can I remove default version of bundler?

You have to delete the . gemspec file corresponding to the default gem you want to delete. So first, locate where those files are. Delete the one you don't need.


2 Answers

per Anne van Rossum, gem update --system fixed this problem for me.

like image 84
user1390375 Avatar answered Sep 20 '22 15:09

user1390375


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

like image 29
Igor Kapkov Avatar answered Sep 19 '22 15:09

Igor Kapkov