在使用gem安裝軟件包時,會時常遇到下面的問題:html
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: Connection reset by peer - SSL_connect (xxx)
不少人不知道緣由是什麼,有懷疑OpenSSL心跳出血問題的,用懷疑GFW的。linux
其實緣由真的就是GFW的問題。那怎麼解決?ruby
只要將原來的源安裝網址,更換爲更加穩定的就能夠了。在國內大淘寶提供了一個鏡像,https://ruby.taobao.org/。是官網的所有鏡像,並且每15分鐘會同步一次,速度及穩定性都有保證。下面是具體的解決步驟:markdown
$ gem source -r https://rubygems.org/
$ gem source -a https://ruby.taobao.org/
$ gem source -l
*** CURRENT SOURCES ***
https://ruby.taobao.org
$
http://www.linuxidc.com/Linux/2015-03/115545.htm
http://www.bubuko.com/infodetail-739997.html
https://ruby.taobao.org/
http://furzoom.com/category/linux/spa
更多請參考Gem管理。code