0

我在我的主要开发机器上安装了 Xcode 5 DP 4。这可能无关紧要,但从那以后,我一直无法安装任何 Ruby gem。如果我输入:

$ gem install rails

它只是挂起。任何其他宝石都一样。如果我执行 aping或 atraceroute我会得到以下结果:

$ ping rubygems.org
PING rubygems.org (54.245.255.174): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
--- rubygems.org ping statistics ---
6 packets transmitted, 0 packets received, 100.0% packet loss

$ traceroute rubygems.org
traceroute to rubygems.org (54.245.255.174), 64 hops max, 52 byte packets
 1  cpe-76-176-148-1.san.res.rr.com (76.176.148.1)  25.744 ms  26.720 ms  29.172 ms
 2  tge1-2.crlscaij-cer01.socal.rr.com (76.166.18.105)  11.141 ms  25.128 ms  13.334 ms
 3  tge0-8-0-2.sndhcaax-ccr01.socal.rr.com (72.129.1.98)  19.853 ms  16.387 ms  16.660 ms
 4  agg22.lsancarc-ccr01.socal.rr.com (72.129.1.0)  16.843 ms  19.371 ms  20.137 ms
 5  107.14.17.132 (107.14.17.132)  16.329 ms  15.789 ms  15.733 ms
 6  66.109.9.24 (66.109.9.24)  17.291 ms  17.508 ms  18.562 ms
 7  las-bb1-link.telia.net (213.248.97.9)  16.518 ms
    las-bb1-link.telia.net (213.248.86.189)  17.344 ms  17.765 ms
 8  sjo-bb1-link.telia.net (213.155.134.103)  34.644 ms
    sjo-bb1-link.telia.net (213.155.137.63)  27.458 ms
    sjo-bb1-link.telia.net (213.248.80.16)  31.402 ms
 9  sea-b1-link.telia.net (213.155.134.81)  64.071 ms
    sea-b1-link.telia.net (213.155.136.69)  52.928 ms  54.107 ms
10  amazon-ic-151248-sea-b1.c.telia.net (213.248.94.30)  52.468 ms  49.540 ms  47.592 ms
11  205.251.225.184 (205.251.225.184)  51.268 ms
    205.251.225.178 (205.251.225.178)  48.527 ms
    205.251.225.184 (205.251.225.184)  93.230 ms
12  205.251.232.74 (205.251.232.74)  68.416 ms
    205.251.232.88 (205.251.232.88)  59.782 ms
    205.251.232.94 (205.251.232.94)  58.221 ms
13  205.251.232.153 (205.251.232.153)  56.725 ms
    205.251.232.147 (205.251.232.147)  59.429 ms
    205.251.232.153 (205.251.232.153)  62.639 ms
14  205.251.232.165 (205.251.232.165)  59.367 ms  56.984 ms  77.981 ms
15  ec2-50-112-0-159.us-west-2.compute.amazonaws.com (50.112.0.159)  56.961 ms
    ec2-50-112-0-241.us-west-2.compute.amazonaws.com (50.112.0.241)  58.880 ms
    ec2-50-112-0-249.us-west-2.compute.amazonaws.com (50.112.0.249)  59.972 ms
16  *

我会在第 16 跳之后为您保存垃圾。

问题:这里可能是什么问题?DNS 可以很好地解析 ruby​​gems.org,因为我可以直接访问网页。关于再次安装 gems 的任何提示?

哦,顺便说一句,我做了一个xcode-select -switch恢复到我的 Xcode 4 框架和工具。

谢谢!

4

1 回答 1

0

好的,我在回复 Frederick Cheung 的评论后追踪了它。在 .gemrc 文件中,有对 gems.rubyforge.org 的引用,它正在超时。在此期间没有检查其他宝石来源。

删除此源解决了问题。

于 2013-08-04T20:35:50.223 回答