Closed timoschilling closed 8 years ago
I don't think this is a good idea, since running bundle can change the Gemfile.lock
file again, resulting in bundler running multiple times.
This is because Gemfile.lock
is mostly an 'output file'. (Though, when it changes, you'll likely want the Rails app reloaded instead, etc.)
If you're changing the Gemfile.lock
as a result of a branch checkout in a Rails project, it's better to setup git hooks to touch the Gemfile
automatically.
What's your use case for this?
Oh, and it's best to restart Guard when the repo changes - so you may prefer to run guard-bundler on startup anyway.
Even the
Gemfile.lock
should be watched to trigger bundle on updates from repo changes