Problems with SSL dependent gems OAuth2 & ActiveMerchant

Hello all,
My application uses the OAuth2 gem (0.1.1) to connect to Facebook, and
the ActiveMerchant gem (1.12.0) to connect to PayPal. Under what is the
current Rails/Ruby distribution, both of these gems throw the following
OpenSSL::SSL::SSLError when used:

* SSL_connect returned=1 errno=0 state=SSLv3 read server certificate

B: certificate verify failed

I did some digging, and found two patches. The first involves plugging
this into my initializers folder as “faraday.rb” (http://bit.ly/hZqNwQ).
The OAuth2 (Facebook) side of things does work with this patch. However,
the ActiveMerchant (PayPal) code still throws the same SSL_connect
error.

The second patch I’ve tried (unsuccessfully) is the
‘always_verify_ssl_certificates’ gem (http://bit.ly/dXmuUh). I did the
following things: (1) gem ‘always_verify_ssl_certificates’ in the
Gemfile (2) require ‘always_verify_ssl_certificates’ in the
ApplicationController file. However, both OAuth2 (Facebook) and
ActiveMerchant (PayPal) throw the following TypeError:

* wrong argument (NilClass)! (Expected kind of

OpenSSL::SSL::SSLContext)

Here are the links to my OAuth2 Facebook code (http://bit.ly/hRO0Yf) and
my ActiveMerchant PayPal code (http://bit.ly/hQzdp6) as they stand now.
This is after following the 2010 OAuth2 guide by Michael B. and the
2008 Cody F. ActiveMerchant tutorial. Any help is greatly
appreciated! I’m very confused at this point.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs