
mac os
$ rvm osx-ssl-certs update
- Get the CURL Certificate Authority (CA) bundle. You can do this with:
$ sudo port install curl-ca-bundle [if you are using MacPorts]
- Execute the ruby code that is trying to verify the SSL certification:
$ SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem
- gem 安装没有问题,但 bundle 安装报错,可以尝试更新 bundle
gem install bundle
Windows
$ gem install compass
// SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
- 下载 http://curl.haxx.se/ca/cacert.pem 文件到本地,路径为 C:Ruby23-x64cacert.pem
- 新建系统环境变量 SSL_CERT_FILE , 值为 C:Ruby23-x64cacert.pem
- 重新打开命令行工具
参考
- stackoverflow - certificate verify failed
- OpenSSL Errors and Rails – Certificate Verify Failed
- stackoverflow - certificate-verify-failed-on-windows
作者:bigfact
版权声明:本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。




近期评论