The reason why you're getting an error in the second case is that, Guard
automatically selects an available notifier by going through the installed ones on your box(es). So, one way to get the functionality you want is to create two separate environments.
Say, macdev
and windev
on your computer and the windows machine respectively, and in your Gemfile
, you'd add the gntp
gem only in the group :macdev {..}
part. More on creating custom environments in Rails: http://railscasts.com/episodes/72-adding-an-environment
# Gemfile
group :macdev do
gem 'ruby_gntp'
end
group :windev do
# a windows-specific notification gem, may be.
end
This should fix it.
Alternatively, create an environment variable for each of the VMs:
# On Mac
export VM = "mac"
# and a similar command on windows.
And in your Guardfile,
# Guardfile
notification :off if ENV['VM'] == "win"
notification :gntp, :host => '192.168.1.139' if ENV['VM'] == "mac"