Today I Learned (Series)

Install and use multiple Bundler versions

Published on Thursday, June 9, 2022


As of Bundler v2.3 (when using RubyGems v3.3+), Bundler will automatically use the BUNDLED WITH version specified in Gemfile.lock when running the bundle install command. If the specified version of Bundler is not available, it will be downloaded and installed.

$ bundler -vBundler version 2.3.15$ tail -2 ./example/Gemfile.lockBUNDLED WITH   2.1.4$ (cd ./example && bundler -v)Bundler version 2.1.4

If you can't upgrade to v2.3, there is a workaround. You will have to install the correct version of Bundler manually, but then you can use the _version_ syntax.

$ bundler _2.1.4_ -vBundler version 2.1.4


David R. Myers

I'm a Senior Software Engineer with a love for the craft. I'm building an open source, privacy-focused notes app for the web at