views:

50

answers:

0

I think the 5 sets of files or folder the Rails 3's Bundler create are:

  1. Gemfile
  2. Gemfile.lock
  3. .bundle/config
  4. vendor/bundle
  5. vendor/cache

Is there any more? For each of them, should they be added to the repository? Gemfile and Gemfile.lock, I think so, because that's what let everybody use the same version of gems. For .bundle/config, I think for Development, we probably should add it, because it says "Don't use shared gems" (I think this mean system gems)... etc. I read one doc that says if it is deployment, then use .gitignore to ignore this file, because it can be different on each deployment machine (how?)... so does that mean only on the deployment machine, use a local .gitignore to ignore it, while in development, don't ignore it?

What about for vendor/bundle files? They can contain compiled binaries, so if they are added to the project by a Macbook developer, will another developer using Linux be affected by it? (Or when the project is cloned to the deployment server which uses Linux).

What about vendor/cache? It contains all the .gem files. Can they contain any binary files? Or are they always for the user to do a bundle install --local, and they all contain only text files, so they will generate the appropriate binary files, if any, on the gem directory, so whether adding this folder to the project is optional, although if we run bundle package to generate this folder, the intention is probably so that everybody create the gems using this folder instead of pulling it from rubygems.org?