diff options
author | Andre Arko <andre@arko.net> | 2014-07-23 18:07:19 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-07-23 18:07:19 -0700 |
commit | fb2d989e354d5e95114e5d884b00c0e86cebca86 (patch) | |
tree | 7961bbef08d190e408b26c0ca610e3921acc7e28 | |
parent | 42e4b7570deb35c2dfa76625f68960fe7ab9e742 (diff) | |
download | bundler-fb2d989e354d5e95114e5d884b00c0e86cebca86.tar.gz |
Require OpenSSL instead of relying on autoload.
Apparently just letting Net::HTTP::Persistent try to autoload OpenSSL
doesn’t actually get it loaded on every machine, and then HTTPS requests
start to fail.
Fixes #3107.
-rw-r--r-- | lib/bundler/vendored_persistent.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bundler/vendored_persistent.rb b/lib/bundler/vendored_persistent.rb index bfc69de70e..8ed4ce8306 100644 --- a/lib/bundler/vendored_persistent.rb +++ b/lib/bundler/vendored_persistent.rb @@ -1,3 +1,11 @@ +# We forcibly require OpenSSL, because net/http/persistent will only autoload +# it. On some Rubies, autoload fails but explicit require succeeds. +begin + require 'openssl' +rescue LoadError + # some Ruby builds don't have OpenSSL +end + vendor = File.expand_path('../vendor', __FILE__) $:.unshift(vendor) unless $:.include?(vendor) require 'net/http/persistent' |