>  Q&A  >  본문

openssl - win7下安装sass失败,提示ruby证书不对?

步骤:
1.

gem sources --remove https://rubygems.org/

2.

gem sources -a https://ruby.taobao.org/
Error fetching https://ruby.taobao.org/:
        SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: ce
rtificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/spe
cs.4.8.gz)

3.

gem sources -l
*** CURRENT SOURCES ***

问题出处:
http://stackoverflow.com/questions/4528101/ssl-connect-returned-1-errno-0-state-sslv3-read-server-certificate-b-certificat

https://gist.github.com/fnichol/867550

I had this same issue while working on a Ruby project. I am using Windows 7 64bit.

I resolved this by:

Downloading the cacert.pem file from http://curl.haxx.se/ca/cacert.pem.
Saved that file to C:/RubyCertificates/cacert.pem
Then set my environmental variable "SSL_CERT_FILE" to "C:/RubyCertificates/cacert.pem"
source: https://gist.github.com/fnichol/867550

证书地址:http://curl.haxx.se/ca/cacert.pem

按照上面这位网友的方法配置了环境变量如下图

再次执行gem sources -a https://ruby.taobao.org/
报错依旧

有谁遇到过,还是我的环境变量没有配置对呢?

PHP中文网PHP中文网2710일 전737

모든 응답(4)나는 대답할 것이다

  • ringa_lee

    ringa_lee2017-04-24 09:14:42

    이제 Taobao gem은 업데이트 및 유지 관리를 중단하고 Ruby-China에서 관리하고 있습니다.
    gem 소스 --remove https://ruby.taobao.org/ --add http://gems-china.org/

    회신하다
    0
  • PHP中文网

    PHP中文网2017-04-24 09:14:42

    gem source --add http://rubygems.org/
    gem source -l

    회신하다
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-24 09:14:42

    동일한 문제가 발생하여 https://gist.github.com/fnichol/867550의 단계를 수행하여 성공적으로 통과했습니다(머신에서 로그아웃해야 함).
    그런데 시스템 변수에 추가했는데, 이것이 이유인지는 모르겠습니다.

    회신하다
    0
  • PHP中文网

    PHP中文网2017-04-24 09:14:42

    시스템 변수에 추가하려면 컴퓨터를 다시 시작한 후 Taobao 소스를 전환하는 명령을 실행하세요

    회신하다
    0
  • 취소회신하다