Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 643
ssseee Avatar asked Oct 20 '22 11:10

ssseee


1 Answers

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

like image 128
bkdir Avatar answered Oct 23 '22 03:10

bkdir