Not able to update Bundler version

Viewed 448

I have a gemfile.lock which requires Bundle 2.2.19 . My system has Bundle 1.11.2. Now I ran the following commands:

gem update --system
sudo gem install bundler

Has the following output:

Successfully installed bundler-2.2.31.gem

But after that, I do:

Bundler --version

I still get

Bundler version 1.11.2

And if I try to do

bundle install

I get

You must use Bundler 2 or greater with this lock file

I also tried running

bundler update --bundler

But that does not work either. I also tried uninstalling and reinstalling but while uninstalling, it only uninstalls the 2.2.31 version. Also tried something like

bundle _2.2.31_ install

But it says could not find command. Any suggestions are welcome.

0 Answers
Related