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:

[code lang=ruby]
notification :gntp, :sticky => false, :host => '10.0.2.2', :password => 'yourstrongpassword'
[/code]

The key was discovering that 10.0.2.2 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

Subscribe to future posts

No yukky spam • No more than one email a month