Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find 'cocoapods' (>= 0) among N total gem(s) (Gem::LoadError)

When I am trying to pod install, getting following issue:

Faizs-MBP:newj faizfareed$ pod install
/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'cocoapods' (>= 0) among 50 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/faizfareed/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', execute `gem env` for more information
    from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:324:in `to_spec'
    from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
    from /usr/local/bin/pod:22:in `<main>'
Faizs-MBP:newj faizfareed$ 

You can also find attached detailed image for above error.

Could anyone sort out this issue???


I've followed your instructions & uninstalled all gem. but when I tried to install cocoapods it is giving following error.

enter image description here

Please advice. . .

Thanks

like image 381
Faiz Fareed Avatar asked May 21 '16 10:05

Faiz Fareed


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.

Why is CocoaPods not installing?

Usually, this happens due to visual studio or IntelliJ not able to find the path or associated plugin or extension. Open your terminal and run sudo gem uninstall cocoapods sudo gem install cocoapods restart IDE or Editor Now your error must be solved.

How do I know if CocoaPods is installed on my Mac?

To find if Cocoapods is installed or not run cmd (pod --version). if theresult is (Not Found) Pods is not installed.


1 Answers

Finally I got Solution For installation of CocoaPods in OS X El Capitan

First remove or uninstall all available Gems by using following command in your terminal(which is located in your Launchpad>Other>Terminal or you can also find that in Finder>Applications>Utilities>Terminal)

gem uninstall --all
sudo gem uninstall --all

When after successful uninstallation of all Gems, Then write following command in your terminal

sudo gem install -n /usr/local/bin cocoapods
pod setup

Hope all of you will be awaiting for this answer. anyway, this works for me hence according to me it is best suitable solution to that particular problem.

like image 197
Faiz Fareed Avatar answered Sep 22 '22 18:09

Faiz Fareed