Jamie's Blog

Ruby developer. CTO. Swimmer. Always trying to write more

Configuring Guard notifications with Vagrant

One problem when running everything in a headless Vagrant instance is that you lose the ability to see Guard Rspec notifications. Actually, you don’t lose it but it’s not immediately obvious how to configure Guard. Since Guard is running inside Vagrant, it can’t display the Growl notifications on the guest operating system. However, you can specify a server to send those notifications to:

Configure Growl to accept network notifications (and set a password!)

Then, at the top of your Guardfile, add the following line:

notification :gntp, :sticky => false, :host => '', :password => 'yourstrongpassword'

The key was discovering that was the correct address to use on a guest operating system to communicate with the host operating system. This might change with your Vagrant configuration but this post explains how to get the correct address