Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

cocoapods

After installing cocoapods with sudo gem install cocoapods, attempting to run pod setup returns this error:

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

Output from sudo gem install cocoapods:

CHANGELOG:  [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.28.0...0.29.0) • [CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.28.0...0.29.0) • [cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.2.0...0.3.0)  [ bug/enhancement notes removed for brevity]  Successfully installed cocoapods-0.29.0 Parsing documentation for cocoapods-0.29.0 1 gem installed 

When I list the gems installed, I do not see cocoapods listed among my Local Gems but I do see 'pod' listed in /usr/local/Cellar/ruby/2.0.0-p0/bin.

System Configuration:

Mac OS 10.9 (upgraded from 10.8) Xcode: 5.0.2 (upgrade from 4.x) Ruby path: /usr/local/Cellar/ruby/2.0.0-p0 

How can I get cocopods to work for me?

like image 766
Willam Hill Avatar asked Dec 28 '13 21:12

Willam Hill


People also ask

What is GEM CocoaPods?

cocoapods 0.39. 0. CocoaPods manages library dependencies for your Xcode project. You specify the dependencies for your project in one easy text file. CocoaPods resolves dependencies between libraries, fetches source code for the dependencies, and creates and maintains an Xcode workspace to build your project.

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.

What version of Ruby does CocoaPods use?

Required Ruby Version: >= 2.6.


2 Answers

Uninstalling and reinstalling CocoaPods from the Terminal fixed the issue for me (see the CocoaPods documentation for more information):

gem uninstall cocoapods gem install cocoapods
like image 182
King-Wizard Avatar answered Sep 23 '22 05:09

King-Wizard


For me it was

sudo gem install cocoapods 
like image 43
Mazen Kasser Avatar answered Sep 24 '22 05:09

Mazen Kasser