Ruby gem cucumber SSL 错误和 Gem 来源
问题说明
我正在尝试为 Ruby 安装黄瓜 gem.尽管与此相关的主题很少,但我找不到确切答案的确切问题.在 Windows 上,我尝试运行命令 gem install cucumber
并返回控制台:
I was trying to install cucumber gem for Ruby. Although there were few topics somewhat related to this, I can't find exact question with exact answer. When on Windows I try to run the command gem install cucumber
and the console returned:
错误:无法从 https://rubygems.org/ 下载数据 -SSL_connect 返回=1 errno=0 state=SSLv3 读取服务器证书B:证书验证失败(https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)
ERROR: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)
然后,我搜索了一个解决方案,并在 here 中找到了一些删除源的建议.我运行了 gem sources -r
,它已被删除.
Then, I 谷歌d for a solution and found some suggestions to remove source in here. I ran gem sources -r
and it has been removed.
但这样做不仅在黄瓜中.现在我什至无法添加来源.
But did that not only in cucumber. Now I'm even unable to add source.
正确答案
我在迁移到 ruby 2.0.0 后不久遇到了同样的问题
I had the same issue a while back after moving to ruby 2.0.0
按照以下步骤解决
1)Visit the url http://curl.haxx.se/ca/cacert.pem save the contents as a .pem file(Do not save it as a text file.Make sure the extension is .pem)
2)将文件复制到本地的任何路径,例如:C: uby200ca_cert.pem(在我的情况下)
2)Copy the file to any path in your local eg: C: uby200ca_cert.pem (in my case)
3) 现在添加一个带有变量 SSL_CERT_FILE 和值C: uby200ca_cert.pem"(不带引号)的环境变量(路径在我的情况下.替换为适当的路径)(可以通过导航到添加环境变量计算机 -> 高级设置 -> 环境变量)
3)Now add an Environment variable with Variable SSL_CERT_FILE and value "C: uby200ca_cert.pem"(without quotes)(path is in my case.Replace with appropriate path) (Environment variables can be added by navigating to Computer -> Advanced Settings -> Environment Variables)
4)关闭所有命令提示符并重新启动它们.现在应该可以正常工作了
4)Close all your command prompts and restart them.Things should work fine now
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcgkakk
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
检查邮件是否发送成功
it1352 07-25 -
Android微调工具-删除当前选择
it1352 06-20 -
希伯来语的空格句子标记化错误
it1352 06-22 -
复制文件夹/文件而不修改属性?
it1352 07-15