Search code examples
ruby-on-railsrubyruby-on-rails-3rubygemsguard

Rails 3.2 GNTP not sending notifications


Im using Rails 3.2.2 and am trying to use the ruby_gntp gem to send Growl notifications from Guard.

I'm on Snow Lepoard so using Growl 1.2.2.

Here's my gem file.

source 'https://rubygems.org'

gem 'rails', '3.2.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

group :assets do
  gem 'coffee-rails'
  gem 'uglifier'
end

gem 'jquery-rails'

group :development, :test do
  gem 'capybara'
  gem 'rspec-rails'
  gem 'guard-rspec'
  gem 'rb-fsevent'
  gem 'ruby_gntp'
end

# Gems used only for assets and not required
# in production environments by default.
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

When I run Guard with the bundle exec guard command. I receive the following...

Running all specs
No examples found.


Finished in 0.00005 seconds
0 examples, 0 failures
ERROR: Error sending notification with gntp: Connection refused - connect(2)

I did some research and read that it may be a version error with previous growl gems that I had installed. I have removed those gems but am still receiving the error.

Edit: Got it working :) Simply changed the ruby_gntp for the growl gem in my gem file.

My gemfile now reads..

source 'https://rubygems.org'

gem 'rails', '3.2.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

group :assets do
  gem 'coffee-rails'
  gem 'uglifier'
end

gem 'jquery-rails'

group :development, :test do
  gem 'capybara'
  gem 'rspec-rails'
  gem 'guard-rspec'
  gem 'rb-fsevent'
  gem "growl", :git => "https://github.com/visionmedia/growl.git"
end

# Gems used only for assets and not required
# in production environments by default.
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

Solution

  • The Guard README explains that Ruby GNTP needs at least version 1.3 of Growl. I recommend to install the Growl notifier, which works for all Growl versions.