Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect

快速解决 编辑Gemfile,将第一行"source 'http://rubygems.org'"里的https替换为http即可。

在本地虚拟机ubuntu 14.10 server下,用rbenv新安装了ruby2.2.3,以及 rails4.2.4。创建了一个新项目,在 执行"bundle install" 时发生如下错误:

尝试用wget直接下载(失败 ):

$ wget https://rubygems.org/gems/jbuilder-2.3.1.gem
--2015-09-28 18:20:47--  https://rubygems.org/gems/jbuilder-2.3.1.gem
Resolving rubygems.org (rubygems.org)... 54.186.104.15
Connecting to rubygems.org (rubygems.org)|54.186.104.15|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://rubygems.global.ssl.fastly.net/gems/jbuilder-2.3.1.gem [following]
--2015-09-28 18:20:49--  https://rubygems.global.ssl.fastly.net/gems/jbuilder-2.3.1.gem
Resolving rubygems.global.ssl.fastly.net (rubygems.global.ssl.fastly.net)... 103.245.222.249
Connecting to rubygems.global.ssl.fastly.net (rubygems.global.ssl.fastly.net)|103.245.222.249|:443... connected.
Unable to establish SSL connection.
openssl版本
$ openssl version
OpenSSL 1.0.1f 6 Jan 2014
之后,在其他的ubuntu server 上执行上述wget命令,aliyun上同样失败,而linode下则成功。所有的openssl版本都相同。

你可能感兴趣的:(Rails,Linux)