So I understand that if i run bundler install –deployment it puts the gems in the vendor folder in my application, which is useful for things like shared hosting where I can’t install system wide gems. My question is, should I put this folder into source control (git), or does bundler need to install the gems on different systems, say if we’re developing on a mac and deploying to linux?
Thanks!
Craig
You should not put your bundler directory into source control. You should use a shared server directory to store the bundle data.
If you’re using capistrano, use the built-in bundler capistrano tasks:
(in your config/deploy.rb):
If not, you should create a shared bundle directory that persists between different releases, ie: /data/project/shared/bundle
EDIT: There should be one bundle directory for each codebase/project, not shared between projects. For example, each capistrano deploy directory has it’s own shared area which is shared between releases, but not between deployed apps/codebases.