TIL: Bundle install with a specific version of Bundler
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
It's a weird argument but it works. So next time you have a different major bundler
versions across projects try using this.