Question

rubygems/dependency.rb:296:in `to_specs': Could not find 'cocoapods' (>= 0) among 35 total gem(s) (Gem::LoadError)

from /Users/divyam.shukla/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'

from /Users/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/user/.rvm/gems/ruby-2.0.0-p247/bin/pod:22:in `<main>'

I am getting this error.

Was it helpful?

Solution

Hey I had the same problem that you have, I solve it following the next steps:

(I strongly recommend to use rvm to manage ruby versions)

  1. Remove cocoapods using gem uninstall cocoapods
  2. Install rvm, to do this I followed this steps https://rvm.io/rvm/install
  3. After that reinstall cocoapods using gem install cocoapods
  4. run pod setup

And after that everything works like a charm!.

You could notice that I didn't use sudo.

Hope it could helps you.

EDIT: If you have a slow internet connection it could take several minutes, to check the progress or steps use pod setup --verbose

OTHER TIPS

I just ran this without doing any changes using rvm.

I do have rvm version: rvm 1.25.30 (stable).

Step 1: sudo gem uninstall cocoapods

Step 2: gem install cocoapods

Step 3: pod setup

Make sure not to install with sudo.

do this : sudo gem install -n /usr/local/bin cocoapods

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top