加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails-3 – Rails 3.1.1由于Growl错误导致Guard-rspec无

发布时间:2020-12-16 19:16:37 所属栏目:百科 来源:网络整理
导读:我一直在为RSPEC运行Guard并使用growl_notify gem一段时间(2-3个月),但是现在我无法在任何我的Rails 3.1.1项目中运行.我已经对错误本身做了一些研究,但是没有提出任何结论(除了 someone else有相同的问题). 的Gemfile: source 'http://rubygems.org'gem 'ra
我一直在为RSPEC运行Guard并使用growl_notify gem一段时间(2-3个月),但是现在我无法在任何我的Rails 3.1.1项目中运行.我已经对错误本身做了一些研究,但是没有提出任何结论(除了 someone else有相同的问题).

的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

错误:

Thomas@Thomas-Cannons-MacBook-Pro:~/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>'

解决方法

这对我有用.两件事情:

首先,Guard 0.10.x.要求Growl> = 1.3.从App Store安装Growl 1.3(这些评论非常糟糕,但我没有遇到任何麻烦).

其次,新的Guard版本推荐使用ruby_gntp.只需用gem’ruby_gntp’替换gem’growl_notify’即可.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读