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 = RapleafApi::Api.new("YOUR_API_KEY", :timeout => 10, :ca_file => "path_to_pem_file")
Have fun!
Pingback: SSL verification issue with the foursquare2 gem | From inspiration to realization | Avi Tzurel | אבי צוראל