Home  >  Q&A  >  body text

ruby - gem无法切换淘宝源?

Hi,我是ruby新手一枚,在gem切换淘宝源的时候。我的命令如下:

gem sources --remove https://rubygems.org/
gem sources -a http://ruby.taobao.org/

提示我

这是什么问题?

高洛峰高洛峰2759 days ago1085

reply all(8)I'll reply

  • PHP中文网

    PHP中文网2017-04-24 09:14:21

    See RubyGems mirror

    我们已经停止基于 HTTP 协议的镜像服务, 请在配置中使用 HTTPS* 协议代替
    
    Q: gem install xxx 的时候遇到错误信息包含:“Error fetching data: Errno::ETIMEDOUT: Operation timed out - connect(2)”
    
    A: 网络问题导致请求淘宝服务器被连接重置了,在遇到此类情况的时候,你可以尝试换一台机器或网络尝试安装,看是否还有同样的问题,以确定是淘宝镜像服务器的问题还是你的环境问题,如果你换了环境仍然有问题,请上 Ruby China 发帖求助。

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-24 09:14:21

    http://ruby.taobao.org/ => https://ruby.taobao.org/

    reply
    0
  • 黄舟

    黄舟2017-04-24 09:14:21

    Need to change http to https

    reply
    0
  • 黄舟

    黄舟2017-04-24 09:14:21

    The same thing doesn’t work, there is a problem

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-24 09:14:21

    I have been encountering problems and can’t get over it~

    reply
    0
  • 阿神

    阿神2017-04-24 09:14:21

    I also encountered the problem above, and finally found the answer. Taobao’s gem source is no longer maintained. See the following link for the solution:
    http://www.oschina.net/news/71749/taobao-gems-ruby-china

    reply
    0
  • PHPz

    PHPz2017-04-24 09:14:21

    When using multiple gem sources, you can consider using gsm-sources-manager for management switching.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-24 09:14:21

    Regarding the problem of switching gem sources, I tried it after seeing the above reply and found it useful, but it didn’t go into too much detail. Here I will tell you my solution. I hope it can help people who see this post.

    reply
    0
  • Cancelreply