OS X Yosemite: Cannot install cocoapods

I have a ruby โ€‹โ€‹version: ruby โ€‹โ€‹2.1.2p95 (version 2014-05-08 45877) [x86_64-darwin13.0] When I try to install cocoapods, I get:

$ sudo gem install cocoapods -V ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://rubygems.org/ - no such name (https://api.rubygems.org/latest_specs.4.8.gz) GET https://api.rubygems.org/prerelease_specs.4.8.gz 302 Moved Temporarily GET https://s3.amazonaws.com/production.s3.rubygems.org/prerelease_specs.4.8.gz 200 OK GET https://api.rubygems.org/specs.4.8.gz 302 Moved Temporarily GET https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz 200 OK ERROR: Possible alternatives: cocoapods 

Anyone help me solve this problem?

+6
source share
2 answers

It appears that HomeBrew has several issues with OSX Yosemite on this day. I solved the problem by removing ruby โ€‹โ€‹using the command:

 brew uninstall ruby 

and then install rvm and ruby โ€‹โ€‹again using RVM:

 curl -L https://get.rvm.io | bash -s stable --ruby rvm rubygems latest 

then gem install cocoapods worked like a charm!

+13
source
 brew install ruby 

can also do the job, after which

 sudo gem install cocoapods 

He worked in my yosemite

0
source

Source: https://habr.com/ru/post/970315/


All Articles