0

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.

Ram
  • 1,872
  • 5
  • 31
  • 54
  • what do you see in '~/.rvm/gems/ruby-1.9.3-p484/gems/' ? – jtzero Jan 30 '14 at 14:22
  • I don't have gems under '~/.rvm/gems/ruby-1.9.3-p484 thats the issue. – Ram Jan 31 '14 at 13:36
  • so it sounds like something with rvm is broken (because you somehow have no gems in the dir and yet it reports gems are installed) can you tell *where* rake is installed? Is that the system rake? Also whats the output of ```type rvm | head -n 1``` should be 'rvm is a function' – jtzero Feb 03 '14 at 13:39
  • @jtzero: updated question with rake command and the above command gives rvm is a function. – Ram Feb 03 '14 at 14:29
  • duh, its in global that makes sense, so '~/.rvm/gems/ruby-1.9.3-p484' can be empty, because the gems should be in '~/.rvm/gems/ruby-1.9.3-p484@global' , so I take back what I said about rvm being broken, and still posit, an attempt at installing calabash-cucumber – jtzero Feb 03 '14 at 14:57
  • @jtzero: I can view gems directory in the mentioned path. – Ram Feb 03 '14 at 15:15

3 Answers3

2

my best guess would be gem install calabash-cucumber.which cucumber just references the bin from the cucumber gem not the calabash-cucumber gem

jtzero
  • 2,204
  • 2
  • 25
  • 44
  • I up-voted the answer given by jtzero, because he is correct - the calabash-cucumber gem is not installed. Since you are having trouble with your ruby env, I want to recommend that you have a look at the Calabash.app. https://groups.google.com/forum/?fromgroups#!topic/calabash-ios/aEXHTL8RwKk – jmoody Feb 03 '14 at 09:32
0

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.

Community
  • 1
  • 1
SteveB
  • 652
  • 3
  • 12
0

Since it returns the message that calabash could not be found... Add gem 'calabash-cucumber' to your Gemfile and bundle install it and try again

Lucas
  • 55
  • 1
  • 10