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.
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)
gem uninstall cocoapods
gem install cocoapods
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
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