Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'sudo gem install cocoapods' doesn't work on El Capitan 10.11.4 , ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository

Upgrading from Yosemite to El Capitan seem to have wiped out the already installed CocoaPods. When I pod install Alamofire/SwiftyJson, it says 'Pod command not found', and as per the stackoverflow solutions I uninstalled cocoapods and trying to reinstall it with the commands

 - sudo gem uninstall cocoapods
 - sudo gem install cocoapods

I get the error:

"Could not find a valid gem 'cocoapods' (>= 0) in any repository"

Did go through ALL the solutions mentioned by the Gurus under the issue https://github.com/CocoaPods/CocoaPods/issues/3736

mainly tried this which seem to have worked for many. still doesn't work for me.

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

tried modifying the permissions etc as per the solutions provided in the above link and the SO link

http://stackoverflow.com/questions/30812777/cannot-install-cocoa-pods-after-uninstalling-results-in-error?rq=1

Nothing works, EVERYTHING leads to the same error "Could not find a valid gem 'cocoapods' (>= 0) in any repository"

I have also raised a issue on

https://github.com/CocoaPods/CocoaPods/issues/5232
like image 585
Naishta Avatar asked May 01 '16 21:05

Naishta


1 Answers

I struggled with same issue 1 week, finally this works for me

Disable IPv6 and try again with sudo gem install cocoapods --source http://rubygems.org

Issues seems with network

Few more details give on rugby gems forum - https://help.rubygems.org/discussions/problems/31074-timeout-error

like image 70
Tarun Seera Avatar answered Sep 21 '22 08:09

Tarun Seera