I\'m consistently getting this error on several hosts on my machine, e.g.:
require \'open-uri\' open(\'https://google.com\').read Net::OpenTimeout: execution e
Looks like it's a an issue with how Ruby resolves DNS.
Added require 'resolv-replace' and now it's opening connections immediately.
require 'resolv-replace'
Sources: https://stackoverflow.com/a/27485369/116925 https://github.com/ruby/ruby/pull/597#issuecomment-40507119