Windows 上 Ruby 的 SSL 错误 [英] SSL Error with Ruby on Windows

查看:27
本文介绍了Windows 上 Ruby 的 SSL 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Win 7 x64

每当我尝试安装 gem 时,我都会收到 SSL 错误.

Whenever I try and install a gem I get an SSL error.

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (https://your-dns-needs-immediate-attention.win/quick/Marshal.4.8/responders-2.1.0.gemspec.rz)

基本上,我有这个问题,但此修复程序对我不起作用.

Basically, I have this issue, but the fix isn't working for me.

尝试从 RubyInstaller 全新安装 Ruby 2.2.2,但这给了我 gem 2.4.5 版.已卸载 Ruby.

Tried a fresh install of Ruby 2.2.2 from RubyInstaller, but that gave me gem version 2.4.5. Uninstalled Ruby.

尝试从 RubyInstaller 全新安装 Ruby 2.1.6,但出现 SSL 错误.尝试了上面的修复,不行.无法安装捆绑器.已卸载 Ruby.

Tried fresh install of Ruby 2.1.6 from RubyInstaller, got the SSL error. Tried the fix above, no go. Unable to install bundler. Uninstalled Ruby.

尝试从 RailsInstaller 进行全新安装.那行得通,从某种意义上说它带有捆绑器.所以现在我可以运行 bundle installbundle update 来获取 gems.但我仍然无法gem install xxx 任何东西.

Tried a fresh install from RailsInstaller. That worked, in the sense it came with bundler. So now I can run bundle install and bundle update to get gems. But I still can't gem install xxx anything.

推荐答案

先尝试更新 ruby​​gems:

Try to update the rubygems first:

  1. C:\>gem install ruby​​gems-update -s http://rubygems.org
  2. C:\>update_rubygems

然后再次尝试安装 gem:

Then try to install gem again:

<代码>C:\>gem 安装包

这篇关于Windows 上 Ruby 的 SSL 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆