Wednesday, September 02, 2009

If your Ruby app using https or some other form of SSL is complaining about:

net/http.rb:567: warning: can't set verify locations

Then you probably passed in a bogus path to your CA file or path. In my case I had:

http.ca_file = '/etc/pki/tls/certs/ca-bundle.crt'
http.verify_mode = OpenSSL::SSL::VERIFY_PEER

That path is right on Red Hat, but I was running the script on my Mac laptop. Whoops. Fixed the path to something valid and the error went away.