0

I send a post request to url to get the access token.

result = RestClient.post('https://stackexchange.com/oauth/access_token',
                        {:client_id => CLIENT_ID,
                         :client_secret => CLIENT_SECRET,
                         :code => session_code,
                         :redirect_uri => 'http://rails.example.com:3000/stackoverflow/callback'},
                         #:verify_ssl => false,
                         )

but the error as below:

RestClient::SSLCertificateNotVerified in StackoverflowController#callback
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

even I set the verify_ssl to false, still doesn't work, hope someone can help me, thanks in advance!

ruby version: ruby 2.2.2p95
rails version: Rails 4.2.3
rest-client (1.8.0)
pangpang
  • 8,581
  • 11
  • 60
  • 96
  • @WandMaker but my ruby version is 2.2.2 – pangpang Sep 03 '15 at 17:20
  • But I think resolution will be same. This issue keeps getting reported very often. See this one - which was asked 2 days ago, but no reply for it yet - http://stackoverflow.com/questions/32321703/opensslsslsslerror-ssl-connect-error-on-ruby-2-2-1#comment52553498_32321703 Also, add OS details, it may help for people to assist you better – Wand Maker Sep 03 '15 at 17:23
  • @WandMaker thanks for your info – pangpang Sep 03 '15 at 18:28

0 Answers0