2012-05-03 50 views
3

我使用Rails 3.2.2並試圖使用ruby_gntp gem發送來自Guard的Growl通知。Rails 3.2 GNTP不發送通知

我在Snow Lepoard上,所以使用Growl 1.2.2。

這是我的寶石文件。

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' 

當我使用bundle exec guard命令運行Guard時。我收到以下...

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) 

我做了一些研究,並發現它可能是我以前安裝的咆哮寶石的版本錯誤。我已經刪除了這些寶石,但仍然收到錯誤。

編輯:得到它的工作:)只需更改ruby_gntp爲我的寶石文件中的growl寶石。

我的Gemfile現在讀..

源 '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' 

回答

2

我在OS X 10.8上有完全相同的錯誤。在Mac OS X 10.8 +通知通過增長與寶石等作品的Gemfile:

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

而且不要忘了打開的低吼。我想推薦使用寶石terminal-notifier-guard。它通過Mac通知中心提供通知。

0

我在通過Mac App Store更新Growl後發生了同樣的錯誤。

我解決了這個問題,重新安裝了Growl的1.2.2. disk image(在download page上列出)的Extras/growlnotify/growlnotify.pkg的growlnotify。