简体   繁体   中英

Errors while installing Calabash for iOS

I followed the steps in the following and tried to install calabash.

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

But when I run the command calabash-ios setup got the following errors.

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

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 . which cucumber just references the bin from the cucumber gem not the calabash-cucumber gem

I had this same problem and only resolved it by removing rvm:

rvm implode

And some additional steps: How can I remove RVM (Ruby Version Manager) from my system? I would recommend restarting Terminal after doing the above.

From there I only had Ruby 1.8 on my machine. So I updated it using 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. Then restart the calabash install with:

sudo gem install calabash-cucumber

And continue on with the setup process after that.

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

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