Unable to run growl notifications and gem growl_notify throws errors

Deadly 提交于 2020-01-01 10:49:33

问题


I am unable to get growl notifications when i run $guard Do i need any particular version for growl_notify?

Growl version = 1.2

Here is my gem file.

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

Error message when i install/ pub growl_notify in gemfile

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'

回答1:


Make sure you are running Growl 1.3.xx In your Gemfile remove gem 'growl' and in your :test group add gem 'ruby_gntp' then run

$ gem uninstall growl_notify
$ bundle install



回答2:


Should use following gemfile, with rails 3.1.3 & Growl ver 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'


来源:https://stackoverflow.com/questions/8632785/unable-to-run-growl-notifications-and-gem-growl-notify-throws-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!