carlhuda/bundler — pull request #2076 by davidcelis (2012-08-23 17:27:37+00:00)
Title: Require openssl when bundling on JRuby

By default, most Gemfiles use https://rubygems.org/ as their source, and
rightly so. SSL is a good default to maintain. However, bundling on the
JRuby platform has had issues for a long time now, usually throwing
`LoadError: OpenSSL::SSL requires the jruby-openssl gem`. This is a
problem I see repeatedly on Rails applications generated under JRuby,
despite having `gem 'jruby-openssl'` in the Gemfile. Bundler dies before
the gem can be installed, however; even having `jruby-openssl`
preinstalled would fail.

This patch adds a `require` statement for `'openssl'` in the place that
seemed most logical to me, `lib/bundler/fetcher.rb`. After adding this
require statement, bundling via HTTPS has worked flawlessly.

Signed-off-by: David Celis