简体   繁体   English

Rails的“后卫”无法启动

[英]Rails “guard” doesn't start

New to TDD and trying to setup the environment with a new app. TDD的新功能,并尝试使用新应用设置环境。 I created a new rails app and bundle installed the following: 我创建了一个新的Rails应用并捆绑了以下内容:

group :test, :development do
    gem 'turn'
    gem 'rspec-rails'
    gem 'capybara'
    gem 'guard-rspec'
    gem 'growl_notify'
end

After doing a rspec:install and guard init, I tried to run "guard" but got the (-10660) (Connect::CantLaunchApplicationError). 在执行rspec:install和guard初始化之后,我尝试运行“ guard”,但得到了(-10660)(Connect :: CantLaunchApplicationError)。 The following is the console output: 以下是控制台输出:

/Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/_aem/connect.rb:89:in `rescue in launch_application': The application cannot be run because it is inside a Trash folder. (-10660) (Connect::CantLaunchApplicationError)
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/_aem/connect.rb:85:in `launch_application'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/_aem/connect.rb:182:in `rescue in local_app'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/_aem/connect.rb:177:in `local_app'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/aem.rb:146:in `by_path'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/appscript.rb:57:in `connect'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/appscript.rb:159:in `reference_by_name'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/lib/appscript.rb:633:in `method_missing'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/growl_notify-0.0.3/lib/growl_notify.rb:29:in `register'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/growl_notify-0.0.3/lib/growl_notify.rb:19:in `config'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifiers/growl_notify.rb:44:in `available?'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:158:in `add_notification'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:209:in `block (2 levels) in auto_detect_notification'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:209:in `each'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:209:in `find'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:209:in `block in auto_detect_notification'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:208:in `each'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:208:in `auto_detect_notification'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/notifier.rb:101:in `turn_on'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard.rb:159:in `setup_notifier'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard.rb:68:in `setup'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard.rb:188:in `start'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/lib/guard/cli.rb:110:in `start'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/guard-1.8.0/bin/guard:6:in `<top (required)>'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/bin/guard:23:in `load'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/bin/guard:23:in `<main>'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/Username/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

It looks like an issue with growl_notify . 看起来是grol_notify的问题。

The code path that Guard is using involves using LaunchServices on OS X, which requires that running applications not be located in the Trash. Guard使用的代码路径涉及在OS X上使用LaunchServices ,这要求正在运行的应用程序不在垃圾箱中。 It throws error kLSAppInTrashErr = -10660 when trying to launch an app that's in the Trash. 尝试启动垃圾箱中的应用程序时会引发错误kLSAppInTrashErr = -10660

In this case, looking at this line in the backtrace: 在这种情况下,请在回溯中查看此行:

from /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/growl_notify-0.0.3/lib/growl_notify.rb:29:in `register'

it looks like it's trying to use Growl (see the code here ). 看起来它正在尝试使用Growl(请参阅此处的代码)。 I would check that your Trash is completely empty, and if you're intending to use growl_notify, make sure Growl is installed properly or else disable it. 我会检查您的回收站是否完全空了,如果您打算使用growl_notify,请确保已正确安装Growl,否则请禁用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM