[root@app-test ruby-2.2.3]# gem install capistrano -v 2.15
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/quick/Marshal.4.8/capistrano-2.15.0.gemspec.rz)
后来查找了下原因,在淘宝的网站上发现了相同的描述,才发现是GFW的原因,他们提供了一个gem server。
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org
更改为taobao的源之后使用gem install即可