Skip to content

Commit

Permalink
HTTPS gem sources need the SSL gem on JRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Mar 7, 2011
1 parent 93f23e5 commit 3fa17f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/bundler/source.rb
Expand Up @@ -122,6 +122,12 @@ def cache(spec)
end end


def add_remote(source) def add_remote(source)
# JRuby ships SSL as a gem due to crypto laws. We need it to talk to any
# rubygems servers that are HTTPS. So we require it here.
if source.to_s =~ /^https/ && defined?(JRUBY_VERSION)
begin; require 'openssl'; rescue LoadError; end
end

@remotes << normalize_uri(source) @remotes << normalize_uri(source)
end end


Expand Down

0 comments on commit 3fa17f6

Please sign in to comment.