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 unix 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 = RapleafApi::Api.new("YOUR_API_KEY", :timeout => 10, :ca_file => "path_to_pem_file")

Have fun!

<img src="http://feeds.feedburner.com/~r/KensoDev-en/~4/dGovIPN9Rr8" height="1" width="1"/>
Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com