Windows 7 64 位:找不到有效的 gem 'compass' (>= 0),原因如下:无法从 https://rubygems.org/下载数据 [英] Windows 7 64-bit: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/
问题描述
我无法安装指南针.我想在我的项目上安装指南针,所以当我尝试更新时,我得到了这个:
I cannot install compass. I want to install compass on my project so when I try to update, I get this:
c:\wamp\www\danjasnowski.com>gem 安装指南针错误:找不到有效的 gem 'compass' (>= 0),原因如下:无法从 https://下载数据/rubygems.org/ - SSL_connect 返回=1 errno=0 state=SSLv3 读取服务器证书 B:证书验证失败 (https://api.rubygems.org/specs.4.8.gz)
c:\wamp\www\danjasnowski.com>gem install compass ERROR: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
还有..我当前的版本.
Also.. my current version.
c:\wamp\www\danjasnowski.com>gem --version
c:\wamp\www\danjasnowski.com>gem --version
2.4.1
和
irb(main):001:0>RUBY_VERSION
irb(main):001:0> RUBY_VERSION
=>2.0.0"
irb(main):002:0>RUBY_RELEASE_DATE
irb(main):002:0> RUBY_RELEASE_DATE
=>2014-05-08"
=> "2014-05-08"
irb(main):003:0>RUBY_PLATFORM
irb(main):003:0> RUBY_PLATFORM
=>x64-mingw32"
=> "x64-mingw32"
irb(main):004:0>RUBY_PATCHLEVEL
irb(main):004:0> RUBY_PATCHLEVEL
=>481
irb(main):005:0>
irb(main):005:0>
推荐答案
尝试升级您的 SSL 证书.
Try upgrading your SSL certificates.
将此文件保存在您想要的任何位置,例如:
Save this file anywhere you want, such as:
C:\cacert.pem
在命令行中,告诉 Ruby 在哪里可以找到证书文件,例如:
On the command line, tell Ruby where to find the cert file, such as:
set SSL_CERT_FILE=C:\cacert.pem
再试一次.
Try again.
gem install compass
如果有效,您可以将证书文件添加到您的控制面板中,使其永久生效.
If it works, you can make the cert file permanent by adding it in your control panel.
信用和更多信息:https://gist.github.com/fnichol/867550
这篇关于Windows 7 64 位:找不到有效的 gem 'compass' (>= 0),原因如下:无法从 https://rubygems.org/下载数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!