1.15) Curren..." /> 1.15) Curren..." /> 1.15) Curren..."/>

after bundler installed with specific version why version of bundler did not change?

2.4k Views Asked by At

I got following error for bundle

Bundler could not find compatible versions for gem "bundler": In Gemfile: bundler (~> 1.15)

Current Bundler version: bundler (2.0.1) This Gemfile requires a different version of Bundler. Perhaps you need to update Bundler by running gem install bundler?

Could not find gem 'bundler (~> 1.15)' in any of the relevant sources: the local ruby installation

then I tried to downgrade the bundler version with

$ gem install bundler -v '~> 1.7.0' Fetching: bundler-1.7.15.gem
(100%) Successfully installed bundler-1.7.15 Parsing documentation for bundler-1.7.15 Installing ri documentation for bundler-1.7.15 Done installing documentation for bundler after 1 seconds 1 gem installed

but when I recheck the bundler version with

bundler --version

it still said Bundler version 2.0.1

2

There are 2 best solutions below

1
On

The default bundler version on your system is still 2.0.1. If you need to use the downloaded version 1.7.15, you would have to run bundle _1.7.15_ install. You could also check if that version was successfully installed on your system using bundle _1.7.15_ -v
In either case, if you get the error Could not find command "_1.7.15_", then that means that the bundler version _1.7.15_ has not been installed on your system.
Additionally, these links may help you:

0
On

Try updating bundle with bundler update bundler and run the bundle update again. It solved my problem the last time.