I am trying to build a rake task that accesses the API of viglink, a url affiliating service.
However, when my rake task runs open(url), where url is an https uri, the error I get is:
rake aborted!
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
I tried to fix this using this answer, but I get the same error
OpenSSL::SSL::SSLError on Heroku
Is anyone having a similar issue that isn't solved with the above ? I'm running this on a Digital Ocean droplet on Ubuntu 12.04.4 LTS (GNU/Linux 3.8.0-29-generic x86_64)
relevant part of my rake task:
url = "https://www.viglink.com/service/v1/cuidRevenue?lastDate=2014%2F12%2F23&period=week&secret=0d0dfillerb57acb4"
response = open(url)
The error happens on the 2nd line.
Happy holidays!