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.
You'll have seen gem install xxx . These are installed into a central database of versions. If you imagine that CocoaPods installs all libraries/frameworks into a System folder and they are linked at runtime, then you have the rough idea of how RubyGems keeps all the gems.
CocoaPods is built with Ruby and is installable with the default Ruby available on macOS. We recommend you use the default ruby. Using the default Ruby install can require you to use sudo when installing gems.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With