gem install显示错误(Gem::RemoteFetcher::FetchError)

今天想试下http://fir.im的官方工具 fir-cli ,于是执行命令

sudo gem install fir-cli --no-ri --no-rdoc

不料,竟然返回错误信息

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/quick/Marshal.4.8/fir-cli-1.1.5.gemspec.rz)

网上搜了下,找到了解决方案,执行命令

sudo gem sources -r https://rubygems.org/
gem sources -a https://ruby.taobao.org/

看下ruby源

gem sources -l

显示如下

*** CURRENT SOURCES ***

https://ruby.taobao.org/

然后再次执行命令

sudo gem install fir-cli --no-ri --no-rdoc

显示

Fetching: rubyzip-1.1.7.gem (100%)
Successfully installed rubyzip-1.1.7
Fetching: ruby_android-0.7.7.gem (100%)
Successfully installed ruby_android-0.7.7
Fetching: unf_ext-0.0.7.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed unf_ext-0.0.7.1
Fetching: unf-0.1.4.gem (100%)
Successfully installed unf-0.1.4
Fetching: domain_name-0.5.24.gem (100%)
Successfully installed domain_name-0.5.24
Fetching: http-cookie-1.0.2.gem (100%)
Successfully installed http-cookie-1.0.2
Fetching: rest-client-1.8.0.gem (100%)
Successfully installed rest-client-1.8.0
Fetching: CFPropertyList-2.3.1.gem (100%)
Successfully installed CFPropertyList-2.3.1
Fetching: fir-cli-1.1.5.gem (100%)

        ______________        ________    ____
       / ____/  _/ __ \      / ____/ /   /  _/
      / /_   / // /_/ /_____/ /   / /    / /
     / __/ _/ // _, _/_____/ /___/ /____/ /
    /_/   /___/_/ |_|      \____/_____/___/

  ## 更新记录
  ### FIR-CLI 1.1.5
  - 完全兼容新版 API ✔
  - 请使用新版 API Token
  - 新版 API Token 查看地址: `http://fir.im/user/info`
  - 增加 `fir me` 指令查看当前登录用户
  - 增加团队成员直接上传 app
  - https://github.com/FIRHQ/fir-cli

Successfully installed fir-cli-1.1.5
9 gems installed

好了,到这安装成功了,现在开始体验下fir-cli

你可能感兴趣的:(ios)