Solving the SSL issue with the Rapleaf API

While working with the Rapleaf API, I encountered some major issues with SSL on production and staging servers.

Discarding what I did, the application just couldn’t get through to the external service using SSL and kept giving me errors regarding SSL communication.

After reading the Rapleaf gem documentation I found that you should reference your certificate file, this “telling” the service where your certificate file is.

I am working with Amazon EC2 for deployment of my application, both for production and for staging, I had some trouble finding the file, so I executed a *nix command and found the files in no time.

Here’s how you find the file:


find / -name ‘*.pem’


Once you find the file, you just create the API instance and refer to it’s path like so:


@api =“YOUR_API_KEY”, :timeout => 10, :ca_file => “path_to_pem_file”)


Have fun!

Submit to Hacker News

[NOTE] This post has been imported to Hugo from a Wordpress blog. It may be broken, missing images, code snippets or other information.

[NOTE] updated April 25, 2011. It's 2835 days old . This article may have outdated content.