简体   繁体   中英

SSLv3 read server certificate B: certificate verify failed (Twitter::Error)

I have received this error message:

twitter/rest/client.rb:96:in 'rescue in request' ssl_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Twitter::Error)

My code is:

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)

I am working with Windows 7 and Ruby 1.9.3. I have installed the latest certificates and updated my ruby gems to the latest version.

I have tried http://railsapps.github.io/openssl-certificate-verify-failed.html and https://gist.github.com/fnichol/867550 already and have been able to install everything mentioned there, but the error persists.

This is How you fix this problem is Windows

download .perm file first, then set the SSL_CERT_FILE in command prompt like this: SSL_CERT_FILE=C:\\my_path\\to.pem

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM