ruby – OS X Yosemite:无法安装cocoapods

前端之家收集整理的这篇文章主要介绍了ruby – OS X Yosemite:无法安装cocoapods前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有 ruby版本: ruby 2.1.2p95(2014-05-08修订版45877)[x86_64-darwin13.0]
当我尝试安装cocoapods时,我得到:
$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

有人帮我解决这个问题吗?

解决方法

看来,在这一天HomeBrew与OSX Yosemite几乎没有问题.
我通过使用以下命令删除ruby解决了我的问题:
brew uninstall ruby

然后使用RVM再次安装rvm和ruby:

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

然后宝石安装cocoapods就像一个魅力!

原文链接:https://www.f2er.com/ruby/267801.html

猜你在找的Ruby相关文章