【发布时间】:2012-05-12 23:13:35
【问题描述】:
我正在使用 Rails 3.2.2 并尝试使用 ruby_gntp gem 从 Guard 发送 Growl 通知。
我在 Snow Lepoard 上,所以使用 Growl 1.2.2。
这是我的 gem 文件。
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)
我做了一些研究,发现这可能是我之前安装的咆哮 gem 的版本错误。我已经删除了这些宝石,但仍然收到错误消息。
编辑:得到它的工作 :) 只需在我的 gem 文件中将 ruby_gntp 更改为 growl gem。
我的 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'
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 rubygems guard