国内gem 淘宝源添加的问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了国内gem 淘宝源添加的问题相关的知识,希望对你有一定的参考价值。
gem添加taobao源的时候,会报如下SSL验证错误。
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
解决办法来自stackoverflow.:
Download http://curl.haxx.se/ca/cacert.pem into c:\railsinstaller\cacert.pem. Make sure you save it as a .pem file, rather than a text file.
Go to your Computer -> Advanced Settings -> Environment Variables
Create a new System Variable:
Variable: SSL_CERT_FILE Value: C:\RailsInstaller\cacert.pem
再添加taobao源
>gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
https://ruby.taobao.org/ added to sources
source https://rubygems.org/ not present in cache
>gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/
本文出自 “叶落花开” 博客,请务必保留此出处http://wb127.blog.51cto.com/2232662/1755466
以上是关于国内gem 淘宝源添加的问题的主要内容,如果未能解决你的问题,请参考以下文章