在 Windows 上安装 rspec(gem install rspec)时出现错误

3

我正在使用Windows 7,尝试安装rspec,但当我在终端中输入gem install rspec时,出现以下错误。

ERROR:   Could not find a valid gem 'rspec' <>=0>, here is why:
           Unable to download data from https://rubygems.org/ - SSL_connect SYSCA
LL returned=5 errno=0 state=SSLv2/v3 read server hello A <https://rubygems.org/l
atest_rspecs.4.8.gz>
ERROR:   Possible alternatives: rspec

我在互联网上寻找解决方案,但是没有找到任何内容。

1个回答

1
错误信息中的“SSL”部分听起来与您本地拥有的证书和rubygems.org正在使用的证书this issue类似。有特定的Windows说明,向您展示如何下载更新的证书文件并使用它;这可能值得一试。

谢谢,设置 SSL_CERT_FILE=C:\path_to_downloaded_cert\cacert.pem gem install rspec - 现在可以工作了。 - liquide

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接