Permalink
Browse files

HTTPS gem sources need the SSL gem on JRuby

  • Loading branch information...
1 parent 93f23e5 commit 3fa17f6d8c42494efefae122f563675edad96c4c @indirect indirect committed Mar 7, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/bundler/source.rb
View
6 lib/bundler/source.rb
@@ -122,6 +122,12 @@ def cache(spec)
end
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)
end

0 comments on commit 3fa17f6

Please sign in to comment.