无法从 ruby​​gems.org 安装“cocoapods"gem(坏响应后端读取错误) [英] Unable to install 'cocoapods' gem from rubygems.org (bad response backend read error)

查看:12
本文介绍了无法从 ruby​​gems.org 安装“cocoapods"gem(坏响应后端读取错误)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 OSX Mavericks 上运行gem install cocoapods"时遇到错误.

I'm getting an error when I run 'gem install cocoapods' on OSX Mavericks.

$ gem install cocoapods
ERROR:  Could not find a valid gem 'cocoapods' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - bad response backend read error 503 (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/cocoapods-0.27.1.gemspec.rz)
ERROR:  Possible alternatives: cocoapods

请注意,我可以直接下载 cocoapods-0.27.1.gemspec.rz.我正在运行最新版本的 XCode (5.0.1) 及其 CLI 工具的最新版本.RVM 还配置为运行最新的 Ruby 版本 (2.0.0p247)

Please note that I can download the cocoapods-0.27.1.gemspec.rz directly. I am running the latest version of XCode (5.0.1) and the latest version of its CLI tools. RVM is also configured to run the latest Ruby version (2.0.0p247)

推荐答案

虽然我不确定是什么原因导致 read error 503 我能够通过手动安装 cocoapods 相当轻松地解决这个问题.gem.

Though I'm not sure what caused read error 503 I was able to work around the problem fairly easily by manually installing the cocoapods.gem.

如果其他人遇到类似问题(使用 cocoapods 或任何其他 gem),请直接从 RubyGems.org 下载相应的 gem 文件(在我的例子中是 cocoapods-0.27.1.gem).然后运行 ​​gem install cocoapods-0.27.1.gem.install命令会先扫描工作目录,从而检测并安装本地gem包,剪掉损坏的仓库.

If anyone else experiences similar problems (with cocoapods or any other gem), download the appropriate gem file (cocoapods-0.27.1.gem in my case) directly from RubyGems.org. Then run the gem install cocoapods-0.27.1.gem. The install command will scan the working directory first, thus detecting and installing the local gem package, cutting out the broken repository.

这篇关于无法从 ruby​​gems.org 安装“cocoapods"gem(坏响应后端读取错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆