RestClient::SSLCertificateNotVerified (SSL_connect returned=1 errno=0 state=error: certificate verify failed):
curl 'https://www.baidu.com' -I
, 报错:curl: (60) SSL: invalid CA certificate
state=SSLv3
这种错误,与我一样的并不多,结合 curl 的错误,大概尝试了以下方法:
export SSL_CERT_FILE=/usr/local/etc/openssl/.cacert.pem
chmod 755 /usr/local/etc/openssl
brew install curl --with-openssl && brew link curl --force
brew update && brew upgrade openssl
curl: (77) error setting certificate verify locations:
CAfile: /usr/local/etc/openssl/ca-cert.pem
CApath: none
rvm pkg install openssl && rvm reinstall all --force
, 无效,且在安装任意一个版本的 ruby 的最后,都报错:curl: (77) error setting certificate verify locations:
CAfile: /usr/local/etc/openssl/.cacert.pem
CApath: none
There was an error while trying to resolve rubygems version for 'latest'.
Halting the installation.