Search code examples
ruby-on-railsrspecguard

Guard triggering intermittently


I am using rails, guard, fb-fsevent on Mac OSX to trigger rspec when I change a test or code. It works well, but I often get the following sort of message

fsevent_watch[4227] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)

when I start guard with bundle exec guard.

I can often fix this by closing a couple of unneeded applications, but in the end I have to reboot the system. It appears to be caused by watching too many files, so as my application grows it becomes worse. Any suggestions on how to fix this? The relevant version numbers are:

rails 4.2.0, guard 2.6.1, fb-fsevent 0.9.1 on Mac OSX 10.10.1

Solution

  • Since I swapped my mechanical hard drive for an SSD, this problem has gone away (and quite a few other strange issues have dissappeared. Overall, my old drive was very slow, so it may have been causing a timing problem for Guard's detection of changes.