Created
February 16, 2015 23:29
-
-
Save havenwood/9cd08a0b66b75d726ef6 to your computer and use it in GitHub Desktop.
Install a trust certificate to fix `SSL_connect returned=1 errno=0` for old RubyGems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
URL = 'https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/' | |
FILENAME = 'AddTrustExternalCARoot-2048.pem' | |
DIR = File.join RbConfig::CONFIG['rubylibdir'], 'rubygems', 'ssl_certs' | |
pem = open File.join(URL, FILENAME), &:read | |
File.write File.join(DIR, FILENAME), pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment