The root cause is that VirtualBox does not cascade the file change events on the host to the VM. Guard (on Linux) is expecting to receive notifications via inotify events. Instead, you can have guard poll for events with guard -p, but this can lead to your CPU maxing out, so you can throttle the polling back down with guard -p -l 10.

From guard help start:

  -l, [--latency=Overwrite Listen's default latency]
  -p, [--force-polling=Force usage of the Listen polling listener]

http://www.softr.li/blog/2012/07/21/running-guard-over-vagrant


I know this is an older question, but here is a more up-to-date answer:

Guard -o/--listen-on option documentation

Pasted here for quick reference:

-o/--listen-on option

Use Listen's network functionality to receive file change events from the
network. This is most useful for virtual machines (e.g. Vagrant) which have
problems firing native filesystem events on the guest OS.

Suggested use:

On the host OS, you need to listen to filesystem events and forward them to
your VM using the listen script:

    $ listen -f 127.0.0.1:4000

Remember to configure your VM to forward the appropriate ports, e.g.
in Vagrantfile:

    config.vm.network :forwarded_port, guest: 4000, host: 4000

Then, on your guest OS, listen to the network events but ensure you
specify the host path:

    $ bundle exec guard -o '10.0.2.2:4000' -w '/projects/myproject'

If anyone runs into this issue and guard is still not working...

I ended up using watchr. It is an alternative to guard. Events propagation from host to guest machine works ok in watchr. It is also more flexible than autotest.