I ran:
bundle install --path vendor as the first Bundler install. I then ran:
bundle package, which creates a vendor/cache directory and puts in the gems. But, there is also a vendor/ruby/1.9.1/cache/ directory too. It has the same contents (I md5’ed them).
So, what’s the point of bundle package then?
Any insight is much appreciated.
bundle packagestores the.gemsource files invendor/cache, which guarantees smooth deploys and allows reviving old projects easily. This is especially useful when using a fork of a gem because the author can close their repo at any time, leaving your app incomplete.The
vendor/rubydirectory contains the installed gems, which in some cases will be the same. But some gems build with native extensions so these can’t be used in deployment due to different architecture. You should addvendor/rubyto your.gitignorefile.