Created
December 3, 2014 17:32
-
-
Save Voronenko/8173d68a54c199d510eb to your computer and use it in GitHub Desktop.
Fix for windows to install compass, if you spot WARNING: : SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ; Once downloaded - run set SSL_CERT_FILE=C:\Ruby200-x64\cacert.pem
This file contains hidden or 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 'net/http' | |
# create a path to the file "C:\Ruby200-x64\cacert.pem" | |
cacert_file = File.join(%w{c: Ruby200-x64 cacert.pem}) | |
Net::HTTP.start("curl.haxx.se") do |http| | |
resp = http.get("/ca/cacert.pem") | |
if resp.code == "200" | |
open(cacert_file, "wb") { |file| file.write(resp.body) } | |
puts "\n\nA bundle of certificate authorities has been installed to" | |
puts "C:\\Ruby200-x64\\cacert.pem\n" | |
puts "* Please set SSL_CERT_FILE in your current command prompt session with:" | |
puts " set SSL_CERT_FILE=C:\\Ruby200-x64\\cacert.pem" | |
puts "* To make this a permanent setting, add it to Environment Variables" | |
puts " under Control Panel -> Advanced -> Environment Variables" | |
else | |
abort "\n\n>>>> A cacert.pem bundle could not be downloaded." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment