SSLv3读取服务器证书B:证书验证失败(Twitter ::错误)

sss*_*eee 5 ruby twitter rest ssl rescue

我收到此错误消息:

twitter/rest/client.rb:96:'救援请求'ssl_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败(Twitter ::错误)

我的代码是:

require 'twitter'
client = Twitter::REST::Client.new do |config|
  config.consumer_key        = "xxxx" #removed for posting
  config.consumer_secret     = "xxxx" #removed for posting
  config.access_token        = "xxxx" #removed for posting
  config.access_token_secret = "xxxx" #removed for posting
end
client.status(27558893223)
Run Code Online (Sandbox Code Playgroud)

我正在使用Windows 7和Ruby 1.9.3.我已经安装了最新的证书并将我的ruby gems更新到最新版本.

我已经尝试了http://railsapps.github.io/openssl-certificate-verify-failed.htmlhttps://gist.github.com/fnichol/867550并且已经能够安装那里提到的所有内容,但错误仍然存在.

bkd*_*dir 3

这就是 Windows 解决此问题的方法

首先下载 .perm 文件,然后在命令提示符中设置 SSL_CERT_FILE,如下所示:SSL_CERT_FILE=C:\my_path\to.pem

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