刚接触 TDD 并尝试使用新应用程序设置环境。我创建了一个新的 rails 应用程序并捆绑安装了以下内容:
group :test, :development do
gem 'turn'
gem 'rspec-rails'
gem 'capybara'
gem 'guard-rspec'
gem 'growl_notify'
end
在执行 rspec:install 和 guard init 之后,我尝试运行“guard”但得到 (-10660) (Connect::CantLaunchApplicationError)。以下是控制台输出:
/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>'