无法运行咆哮通知和gem growl_notify会抛出错误

时间:2011-12-26 03:45:35

标签: ruby-on-rails-3 guard growl growlnotify

当我运行$ guard时,我无法收到咆哮通知 我是否需要growl_notify的任何特定版本?

咆哮版本= 1.2

这是我的宝石文件。

gem 'rails', '3.1.3'


gem 'sqlite3'


group :development, :test do
  gem 'rspec-rails'
  gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
  gem 'launchy'
  gem 'database_cleaner'
  gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
  gem 'guard-rspec'
  gem 'guard-livereload'
end

gem 'growl'

group :test do
gem 'guard-spork'
end

我在gemfile中安装/ pub growl_notify时出现错误消息

JP:guard2 jayparteek$ guard
/Users/jayparteek/.rvm/gems/ruby-1.9.2-head@guard2/gems/rb-appscript-0.6.1/lib/appscript.rb:542:in `_send_command': CommandError (Appscript::CommandError)
        OSERROR: -10000
        MESSAGE: Apple event handler failed.
        COMMAND: app("/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app").register({:all_notifications=>["success", "pending", "failed", "notify"], :as_application=>"Guard", :default_notifications=>"notify"})
    from /Users/jayparteek/.rvm/gems/ruby-1.9.2-head@guard2/gems/rb-appscript-0.6.1/lib/appscript.rb:642:in `method_missing'

2 个答案:

答案 0 :(得分:7)

确保您正在运行Growl 1.3.xx 在你的Gemfile中删除gem'growl'并在你的:test组中添加gem'ruby_gntp'然后运行

$ gem uninstall growl_notify
$ bundle install

答案 1 :(得分:2)

应使用以下gemfile,使用rails 3.1.3&咆哮1.3.1

gem 'rails', '3.1.3'


gem 'sqlite3'


group :development, :test do
  gem 'rspec-rails'
  gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
  gem 'launchy'
  gem 'database_cleaner'
  gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
  gem 'guard-rspec'
# gem 'guard-livereload'
end

group :test do
gem 'guard-spork'
gem 'ruby_gntp'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.5'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

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