2

我正在尝试运行 calabash-android run command 。我收到如下错误

类似运行的命令:

C:\Users\user_name\workspace\AndroidDemoProject>calabash-android run

C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Co
uld not find gherkin (~> 2.12.0) amongst [CFPropertyList-2.2.0, aruba-0.5.3, awe
some_print-1.1.0, bacon-1.2.0, bcat-0.6.2, bigdecimal-1.1.0, builder-3.2.2, bund
ler-1.3.5, calabash-android-0.4.6, calabash-common-0.0.1, calabash-cucumber-0.9.
146, childprocess-0.3.9, coderay-1.0.9, cucumber-1.3.2, diff-lcs-1.2.4, do-0.1.4
, ffi-1.8.1, geocoder-1.1.8, hoe-3.6.2, hpricot-0.8.6, httpclient-2.3.3, io-cons
ole-0.3, json-1.5.5, kpeg-0.10.0, kramdown-1.0.2, location-one-0.0.10, metaclass
-0.0.1, minitest-5.0.3, minitest-2.5.1, mocha-0.14.0, multi_json-1.7.6, mustache
-0.99.4, net-sftp-2.1.2, net-sftp-2.0.5, net-ssh-2.6.7, net-ssh-2.2.2, permutati
on-0.1.8, pik-0.2.8, rack-1.5.2, rack-protection-1.5.0, rake-10.0.4, rake-0.9.2.
2, rake-compiler-0.8.3, rdiscount-2.1.6, rdoc-4.0.1, rdoc-3.9.5, retriable-1.3.3
, ronn-0.7.3, rspec-2.13.0, rspec-core-2.13.1, rspec-expectations-2.13.0, rspec-
mocks-2.13.1, rubygems-tasks-0.2.4, rubyzip-0.9.9, run_loop-0.0.12, sim_launcher
-0.4.6, sinatra-1.4.2, slowhandcuke-0.0.3, stringex-2.0.2, test-unit-2.5.5, thor
-0.18.1, tilt-1.4.1, top-0.0.1, yard-0.8.6.1] (Gem::LoadError)
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:778:i
n `block in activate_dependencies'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:i
n `each'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:i
n `activate_dependencies'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:i
n `activate'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:781:i
n `block in activate_dependencies'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:i
n `each'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:i
n `activate_dependencies'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:i
n `activate'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:1232:in `gem'
        from C:/Ruby193/bin/calabash-android:22:in `<main>'
4

4 回答 4

0

Calabash-android gem 依赖于 Cucumber,而 cucumber 依赖于 gherkin。因此,如果您使用 ruby​​gems.org 安装 calabash-android

gem install calabash-android

应该安装所有必需的依赖项。

来源:http ://rubygems.org/gems/calabash-android

于 2014-06-29T02:12:04.993 回答
0

错误消息说明了一切:您缺少对 Gherkin 的依赖。试着做:

gem install gherkin

资料来源:http ://rubygems.org/gems/gherkin

于 2013-06-09T01:00:19.497 回答
0

你成功运行这个命令了吗?

$gem install calabash-android

如果出现任何错误,请尝试

$sudo gem install calabash-android

密码:(输入密码并按回车键)

先决条件:

1. App Should have the release build .
2. Make sure that app should be Signed with our own Debug.keystore When the build is delivered.

跑:

$calabash-android run <path-of-apk>

调试:

$calabash-android console <path-of-apk>
于 2014-06-29T13:37:55.040 回答
0

从您的错误消息中可以清楚地看出您缺少 Gherkin gem。

Could not find gherkin (~> 2.12.0)

请安装并重试。

gem install gherkin

您还可以使用以下命令检查所有已安装的 gem

gem list
于 2015-07-14T10:02:09.623 回答