Reputation: 2447
When trying to figure out a bundling issue on TravisCI I accidentally ran
gem update --system
on my Mac. This updated a bunch of things, but I don't know exactly what since I did not save the output. After doing this, in my Rails application, I noticed that when I ran bundle install --local
it began installing and packaging the gems into vendor/cache/ruby/<version>
instead of using the ones in vendor/cache
.
The path in bundler is set to vendor/cache
but some other setting is causing it to bundle the gems under the ruby version directory. Does anyone know what that setting might be or how I can fix Bundler so it uses the gems in vendor/cache
?
Gem versions
bundler - 2.1.2 (2019-12-20 commit 4da3289eb)
rubygems - 3.1.2
Bundler Config
$ bundle config
Settings are listed in order of priority. The top value will be used.
build.libv8
Set for the current user (/Users/me/.bundle/config): "--with-system-v8"
cache_all
Set for your local app (/Users/me/forem/.bundle/config): true
Set for the current user (/Users/me/.bundle/config): true
jobs
Set for the current user (/Users/me/.bundle/config): 3
path
Set for the current user (/Users/me/.bundle/config): "vendor/cache"
Let me know if any other information would be helpful!
Upvotes: 1
Views: 1723
Reputation: 2447
Ok folks here is what the issue was.
I set BUNDLE_PATH to "vendor/cache". This caused Bundler to try and install all of the gems in "vendor/cache/ruby//" which is not ignored by .gitignore
and therefore causes a massive dif.
Reset BUNDLE_PATH back to its default "vendor/bundle"
Upvotes: 2