现在国内ruby gem源从http变成了https,所以在安装gem 源地址变成了https://ruby.taobao.org/。

在命令行执行的时候会有: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: ce rtificate verify failed 的错误。

我也是找了好久才解决的。为了方便使用ruby开发的朋友们更快的使用,我写一下解决方法。

解决方法1:

就是在本地文件中找到一个.gemrc的文件,这个里面是gem的源文件地址。一般都是在你使用的用户目录下或者搜索也行,如图

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

 

然后在路径中添加地址即可。如图:

 

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

 

 

简单吧。

解决方法2:

就是使用其他的gem源:http://gems.ruby-china.org/

 

相关文章:

  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-07-01
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-11-12
  • 2022-01-17
相关资源
相似解决方案