简体   繁体   English

安装Calabash for iOS时出错

[英]Errors while installing Calabash for iOS

I followed the steps in the following and tried to install calabash. 我按照以下步骤操作并尝试安装calabash。

https://github.com/calabash/calabash-ios https://github.com/calabash/calabash-ios

But when I run the command calabash-ios setup got the following errors. 但是当我运行命令calabash-ios setup时出现以下错误。

$ calabash-ios setup
~/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in
`to_specs': Could not find 'calabash-cucumber' (>= 0) among 7 total gem(s) (Gem::LoadError).

Tried some more commands which I mentioned below 尝试了一些我在下面提到的命令

$ which cucumber
~/.rvm/rubies/ruby-1.9.3-p484/bin/cucumber

$ gem list
bundler (1.5.2)
bundler-unload (1.0.2)
executable-hooks (1.3.1)
gem-wrappers (1.2.4)
rake (10.1.1)
rubygems-bundler (1.4.2)
rvm (1.11.3.8)

$ which -a ruby
~/.rvm/rubies/ruby-1.9.3-p484/bin/ruby
/usr/bin/ruby

$ ruby gem
ruby: No such file or directory -- gem (LoadError)

$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.1
- RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-darwin12.5.0]
- INSTALLATION DIRECTORY:(HomeDirectory)/.rvm/gems/ruby-1.9.3-p484
- RUBY EXECUTABLE:(HomeDirectory)/.rvm/rubies/ruby-1.9.3-p484/bin/ruby
- EXECUTABLE DIRECTORY:(HomeDirectory)/.rvm/gems/ruby-1.9.3-p484/bin
- SPEC CACHE DIRECTORY:(HomeDirectory)/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
  -(HomeDirectory)/.rvm/gems/ruby-1.9.3-p484
  -(HomeDirectory)/.rvm/gems/ruby-1.9.3-p484@global
- GEM CONFIGURATION:
  - :update_sources => true
  - :verbose => true
  - :backtrace => false
  - :bulk_threshold => 1000
- REMOTE SOURCES:
  - https://rubygems.org/
- SHELL PATH:
 - ~/.rvm/gems/ruby-1.9.3-p484/bin
 - ~/.rvm/gems/ruby-1.9.3-p484@global/bin
 - ~/.rvm/rubies/ruby-1.9.3-p484/bin
 - /usr/bin
 - /bin
 - /usr/sbin
 - /sbin
 - /usr/local/bin
 - ~/.rvm/bin

EDIT : 编辑:

$rake

rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
~/.rvm/gems/ruby-1.9.3-p484@global/bin/ruby_executable_hooks:15:in `eval'
~/.rvm/gems/ruby-1.9.3-p484@global/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

$rake --trace

rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/lib/rake/application.rb:632:in `raw_load_rakefile'
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/lib/rake/application.rb:94:in `block in load_rakefile'
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/lib/rake/application.rb:93:in `load_rakefile'
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/lib/rake/application.rb:77:in `block in run'
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
~/.rvm/gems/ruby-1.9.3-p484@global/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
~/.rvm/gems/ruby-1.9.3-p484@global/bin/rake:23:in `load'
~/.rvm/gems/ruby-1.9.3-p484@global/bin/rake:23:in `<main>'
~/.rvm/gems/ruby-1.9.3-p484@global/bin/ruby_executable_hooks:15:in `eval'
~/.rvm/gems/ruby-1.9.3-p484@global/bin/ruby_executable_hooks:15:in `<main>'

I prefer Ruby upgrade to deletion. 我更喜欢Ruby升级到删除。

Could please some one help me in resolving the issue. 可以请一些人帮我解决这个问题。

Note : Edited terminal output in the question. 注意:问题中编辑了终端输出。

my best guess would be gem install calabash-cucumber . 我最好的猜测是gem install calabash-cucumber which cucumber just references the bin from the cucumber gem not the calabash-cucumber gem which cucumber只是参考黄瓜宝石中的垃圾桶而不是葫芦黄瓜宝石

I had this same problem and only resolved it by removing rvm: 我有同样的问题,只能通过删除rvm来解决它:

rvm implode

And some additional steps: How can I remove RVM (Ruby Version Manager) from my system? 还有一些额外的步骤: 如何从我的系统中删除RVM(Ruby版本管理器)? I would recommend restarting Terminal after doing the above. 我建议在执行上述操作后重新启动终端。

From there I only had Ruby 1.8 on my machine. 从那里我只在机器上安装了Ruby 1.8。 So I updated it using Mac Ports: 所以我使用Mac Ports更新了它:

sudo port install ruby19 +nosuffix

I would recommend restarting Terminal again at this point. 我建议此时再次重新启动终端。 Hopefully now if you run ruby -v you should see the new version of Ruby displayed. 希望现在如果你运行ruby -v你会看到显示的新版本的Ruby。 Then restart the calabash install with: 然后使用以下命令重新启动calabash安装:

sudo gem install calabash-cucumber

And continue on with the setup process after that. 然后继续设置过程。

因为它返回无法找到calabash的消息...将gem'calabash -cucumber'添加到您的Gemfile并捆绑安装它并再试一次

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

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