Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to load gem cocoa pods while creating repo

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.

like image 539
Divyam shukla Avatar asked Nov 18 '13 07:11

Divyam shukla


People also ask

Where does gem install CocoaPods?

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.

Is CocoaPods a ruby gem?

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.


1 Answers

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

like image 189
Gabriel Goncalves Avatar answered Oct 19 '22 23:10

Gabriel Goncalves