How to change Bundler default version

Following https://bundler.io/guides/bundler_2_upgrade.html#upgrading-applications-from-bundler-1-to-bundler-2, here's what worked for me:

gem install --default bundler
gem update --system
bundler update --bundler

You need to remove .spec file to remove the gem.

Steps:

  1. gem env – try to search in provided list under GEM PATHS, in specifications/default
  2. remove there bundler-VERSION.gemspec
  3. install bundler, if you don't have specific: gem install bundler:VERSION --default

What helped me is to delete the current default manually from the folder lib\ruby\gems\2.6.0\specifications\default\
and then install fresh bundler as usually
gem install bundler
or as default
gem install --default bundler

Tags:

Bundler