简体   繁体   中英

Rails “guard” doesn't start

New to TDD and trying to setup the environment with a new app. I created a new rails app and bundle installed the following:

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). 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 .

The code path that Guard is using involves using LaunchServices on OS X, which requires that running applications not be located in the Trash. It throws error kLSAppInTrashErr = -10660 when trying to launch an app that's in the Trash.

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 ). 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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