I'm using Bundler 1.10.6, and I'm attempting to set up an alternate Gemfile, to keep all of my debugging gems out of the project Gemfile that my team is using.
In my project, I have the typical Gemfile
and Gemfile.lock
files, and the gems are being installed to the vendor/cache
directory. I also have a Gemfile.local
and Gemfile.local.lock
file, which are installing gems into the vendor/local
directory.
This worked great when I initially set it up, but it seems to not be working as intended anymore.
I've set up a bash alias bec
("bundle exec custom")that sets BUNDLE_GEMFILE=Gemfile.local before running any bundle exec
commands, so if I run bec rails s
, the rails server starts up using the gems in my vendor/local folder, as intended.
However, if I run BUNDLE_GEMFILE=Gemfile.local bundle install --path vendor/local
, the gems get installed to the default vendor/cache
directory. The output from the install command is confusing me, though. Here are the relevant parts (emphasis added):
[Bundler fetches gem/version/dependency metadata from my sources]
Resolving dependencies.....................
[Bundler specifies version numbers for all of my gems]
Using gemname 10.0.0
Using gemname 1.5.2.
etc.......
Updating files in vendor/cache <----- !!!!!!!!
* gem-5.8.3.gem
* othergem-1.6.6.4.gem
* etc...........
Removing outdated .gem files from vendor/cache
* gem-5.8.2.gem
* othergem-1.6.6.1.gem
* etc...........
Bundle complete! 48 Gemfile dependencies, 286 gems now installed.
Bundled gems are installed into ./vendor/local. <------ ?!?!?
git status
then shows a ton of deleted and untracked files in vendor/cache
. I have vendor/local
in my .gitignore
, so nothing shows up for that.
My goal here is to not modify the vendor/cache directory at all. Shouldn't the --path
argument solve that? I've got a bash alias that runs this command for me, but doing it manually doesn't change anything. I've also tried setting --path as --path=vendor/local
instead of --path vendor/local
but no change there either. Am I doing this incorrectly?