When I run the following command, it gives me the available installed versions of bundler:
command :
gem list | grep "bundle"
output:
bundler (1.11.2, 1.10.6, 1.10.4, 1.3.6, 1.3.0, 1.3.0.pre)
The current version of bundler I obtained was 1.11.2 using the following command:
bundler --version
I want to use version 1.3.6 How do I swap the current version of bundler with the available ones?
If you want to upgrade the Bundler version used by your application, you can run bundle update --bundler , and your lockfile will be regenerated using the latest version.
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.
You can check your Ruby version by running ruby --version , and you can check your RubyGems version by running gem --version . If you need to upgrade Ruby, use your ruby version manager's instructions. If you need to upgrade RubyGems, run gem update --system .
Normally during development Bundler is used from it's executable on your system, so I don't believe you can specify a specific version in your Gemfile, for example. (You might try it, though). However, you can install the version you like and force the shell/rubygems to use that version:
$ gem install bundler -v 1.3.6
...
1 gem installed
$ bundle _1.3.6_ -v
Bundler version 1.3.6
To get my machine to use 1.3.6 by default I had to uninstall 1.11.2.
Update: I tried specifying gem 'bundler', '~> 1.3'
in one of my projects and it worked, although the CLI for bundler still used the system default version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With