DEV Community


TIL: Bundle install with a specific version of Bundler

talk2megooseman profile image Erik Guzman ・1 min read

The challenge with working on multiple Ruby on Rails projects is coming across issues conflicting dependencies between projects. One issue I have been having has been with the version of bundler. One project I am working on depends on bundler v2 and another depends on bundler v1 running on the same Ruby version.

Upgrading bundler version for the project using bundler v1 is not an option right now and trying to do any bundle installs can get very annoying since it will be using the wrong version of bundler for the Gemlock.

After doing some web searching for a potential solution I found out about this funky annotation for telling bundle what version of the bundler gem you would like to use:

bundle __1.13__ install
Enter fullscreen mode Exit fullscreen mode

Yep, that is 2 underscores before and after the version you would need to use. It's a weird argument but it works. So next time you have a different major bundler versions across projects try using this.

Discussion (0)

Editor guide