SSL verification issue with the Foursquare2 gem [Solved]
I’ve been implementing a Foursquare API into a website using the foursqaure2 gem.
While working on development, everything went smooth, tests passed and it was really cool to work with. However, once I deployed staging and production I immediately encountered the well known SSL issues.
The solution actually wasn’t that trivial, I monkeypatched the gem so you can pass an SSL hash and refer to the ca_file.
This has solved the problem.
Notice the @ssl param, this is the important thing here.
|
|
This is how you pass the hash
If you are running on Amazon or any other cloud solution and you don’t know where your SSL certification is located, there’s a tip in this post on how you can find it.
Like a good Ruby on rails and open source developer, I issued a pull request to the original gem’s developer and this fix will be in the next version of the gem, you can find it here
If you are having issues with SSL, just pay attention to what version of the gem you are running and make sure you are running a version with this fix.