-
Notifications
You must be signed in to change notification settings - Fork 0
Efficient Filesystem Handling
Various operating systems are willing to notify you of changes to files, but the API to register/receive updates varies (see rb-fsevent for OS X, rb-inotify for Linux, and rb-fchange for Windows). If you do not supply one of the supported gems for these methods, Guard will fall back to polling, and give you a warning about it doing so.
A challenge arises when trying to make these dependencies work with Bundler. If you simply put one of these dependencies into you Gemfile, even if it is conditional on a platform match, the platform-specific gem will end up in the Gemfile.lock, and developers will thrash the file back and forth.
There is a good solution. All three gems will successfully, quietly install on all three operating systems, and guard/listen will only pull in the one you need. This is a more proper Gemfile:
group :development do
gem 'rb-inotify', :require => false
gem 'rb-fsevent', :require => false
gem 'rb-fchange', :require => false
endIf you're using Windows and at least Ruby 1.9.2, then Windows Directory Monitor is more efficient than using rb-fchange.
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