2011-12-26 40 views
8

我一直在運行Guard for RSPEC並使用growl_notify gem一段時間(2-3個月),但現在我無法在我的任何Rails 3.1.1項目中運行guard。我已經對錯誤本身進行了一些研究,但無法得出任何結論(除了someone else具有相同的問題)。Rails 3.1.1由於Growl錯誤導致Guard-rspec無法運行:OSERROR:-10000 MESSAGE:Apple事件處理程序失敗

的Gemfile:

source 'http://rubygems.org' 

gem 'rails', '3.1.1' 

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

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

gem 'jquery-rails' 
gem 'spreadsheet' # Allows for reading/writing Excel files. We also need a CSV importer, but that can come later 
gem 'gmaps4rails' # Allows for Google Maps Pushpins/Markers/Places 
gem 'scoped_search' # For Searching 
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git" # For File Uploads 

group :test, :development do 
    gem 'sqlite3' 
    gem 'turn', '<0.8.3' 
    gem 'rspec-rails' 
    gem 'capybara' 
    gem 'guard-rspec' 
    gem 'growl_notify' 
    gem 'launchy' 
    gem 'capistrano' #You don't want Capistrano on the production side (I think) 
end 

group :production do 
    gem 'pg' #use postgres for database installation as the database 
end 

錯誤:

[email protected]:~/development/rails/tasks$ guard 
/Users/Thomas/.rvm/gems/ruby-1.9.2-p290/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/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/rb-appscript-0.6.1/lib/appscript.rb:642:in `method_missing' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/growl_notify-0.0.3/lib/growl_notify.rb:29:in `register' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/growl_notify-0.0.3/lib/growl_notify.rb:19:in `config' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifiers/growl_notify.rb:42:in `available?' 
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard- 0.9.4/lib/guard/notifier.rb:117:in `add_notification' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `block in auto_detect_notification' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `each' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `any?' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `auto_detect_notification' 
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard- 0.9.4/lib/guard/notifier.rb:80:in `turn_on' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard.rb:184:in `start' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/cli.rb:74:in `start' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in `run' 
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor- 0.14.6/lib/thor/invocation.rb:118:in `invoke_task' 
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor- 0.14.6/lib/thor.rb:263:in `dispatch' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:in `start' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/bin/guard:6:in `<top (required)>' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/bin/guard:19:in `load' 
    from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/bin/guard:19:in `<main>' 
+0

我剛剛遇到同一問題 – keruilin

回答

5

這似乎是低吼和growl_notify之間的版本不匹配。 growl_notify 0.0.3改變低吼應用程序的名稱,其中近,我可以用低吼1.3告訴改變(獅子只)

我相信它的作品出來:

  • 使用growl_notify 0.0.2用於低吼< 1.3
  • 使用growl_notify 0.0.3的低吼> = 1.3
  • 使用咆哮寶石(我做了什麼)
+0

不要忘記卸載其他寶石(例如,如果您使用咆哮寶石,請刪除growl_notify)。 – Lenart

7

下面是我工作。兩件事:

首先,衛隊0.10.x.需要Growl> = 1.3。從App Store安裝Growl 1.3(這裏的評論非常糟糕,但我沒有任何問題)。其次,新衛隊版本推薦ruby_gntp。只需將gem 'growl_notify'替換爲gem 'ruby_gntp'即可。

+0

如果你是雪豹,請去寶石'ruby_gntp' –

相關問題