-
Notifications
You must be signed in to change notification settings - Fork 0
Guard 2.10.3 exits when Guardfile is changed
Run Guard with this shell one-liner:
while bundle exec guard; do echo "Restarting guard..."; doneAnd now, every time you change the file, Guard exists and gets restarted by the shell script. 100% bullet proof, as opposed to how reevaluating was implemented up till now.
You may prefer to simply binstub your guard: bundle binstub guard and edit the created bin/guard so it loops there (so you don't need a shell script).
If guard isn't responding to changes to your Guardfile - you may need to move you Guardfile to another directory, and symlink it.
For more info see: Optimizing for large projects
Supporting the feature is a maintenance nightmare, because it's kind of like implementing fork() in pure Ruby in an app that heavily relies on global state. Also, since watching whole projects doesn't make sense - using the directories statement means the Guardfile can't be watched anyway (unless it's symlinked) and since the Guardfile isn't constantly changed and the workaround is trivial - this isn't a show-stopper by any means.
If you strongly disagree - feel free to comment on the existing related issue(s).
This wiki and the Guard README document contains a lot of information, please take your time and read these instructions carefully.
If you run into any trouble, you may start by understanding how Guard works.
We provide detailed changes for each Guard release.
Be sure to read the CONTRIBUTING guidelines before reporting a new Guard issue or open a pull request.
If you have any questions about the Guard usage or want to share some information with the Guard community, please go to one of the following places:
- Google+ community
- Google group
- StackOverflow
- IRC channel
#guard(irc.freenode.net) for chatting
Intro
Installation
- System Notifications
- Terminal Colors on Windows
- Add Readline support to Ruby on Mac OS X
- Which Growl library should I use
- Efficient Filesystem Handling
Getting Started
- List of Guard Commands
- Command Line Options for Guard
- List of available Guards
- Guardfile examples
- Run Guard within RubyMine
- Guardfile-DSL / Configuring-Guard
- Configuration Files
- Interacting with Guard
- Guard Signals
Troubleshooting
Advanced use of Guard
Cookbooks
Development