After requiring open-uri
, one can conveniently download and use files from the web via Kernel#open
. However, trying to do this with https results in a root cert error, because ruby doesn't have all the root certs.
This can be solved like this, but that's for using a Net::HTTP
object with a block.
Is there an elegant way to set use_ssl
and ca_file
for the Net::HTTP
library globally, so that it will apply to my whole app, and commands like Kernel#open
?