Ruby installed
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]
$ gem update --system
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNABORTED: An established connection was aborted by the software in your host machine. - SSL_connect (https://api.rubygems.org/specs.4.8.gz)
$ gem install jekyll
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNABORTED: An established connection was aborted by the software in your host machine. - SSL_connect (https://api.rubygems.org/quick/Marshal.4.8/jekyll-2.5.3.gemspec.rz)
Is there any expert who can give some guidance on the problem?
巴扎黑2017-05-02 09:26:45
FetchError is obviously a connection error, just use a domestic mirror source
In the user home directory, Linux is ~, Windows is C:UsersUSERNAME (it may also be Administrator or ProgramData) Create a new .gemrc file below and try writing the following content:
:sources:
- https://ruby.taobao.org
:update_sources: true
仅有的幸福2017-05-02 09:26:45
Because of circumventing the firewall (using HTTP proxy), if you use HTTP
代理,HTTPs
the connection will fail.
Because HTTPS comes with server verification, and the proxy forwarding data involves HTTP layer data, the proxy service does not have the private key of the website, so it cannot decode the data in the HTTP header. (Actually, the initial certification failed)
The solution is:
1. Add a certificate to the proxy server (it seems unsafe, and the proxy server may not have one)
2. Use socket
proxy socket
代理
3、不要翻墙了,改用国内的源吧 gem source
3. Don’t circumvent the wall, use Domestic source bar gem source
(this is the most reliable)