Reputation: 31074
Page 239 of Agile Web Development with Rails instructs us to add the vendor/cache
directory to git.
Is this actually recommended practice? I was under the impression that this directory was platform-specific. Will it cause problems to commit a cache dir under OSX and then deploy to prod under Linux?
Upvotes: 4
Views: 550
Reputation: 86247
Short answer - yes.
Long answer - it's very handy to keep your gem dependencies with your application. Not just a Gemfile and Gemfile.lock but also the gems themselves.
There are numerous advantages - such as having all your gems available without having to connect to a gem server.
Upvotes: -1
Reputation: 1659
This is where your app's gems are stored if you package them locally. So if you deploy from the SCM source and you want to use the exact gem packages that you are using locally, you'll need these files, which is why I suspect the book suggests this.
As far as the gem files go, it won't cause a problem if you develop on a Mac and deploy to a Linux server.
Upvotes: 6