Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Created February 27, 2015 23:10
Show Gist options
  • Save ferventcoder/47cf61727c78685f2f6e to your computer and use it in GitHub Desktop.
Save ferventcoder/47cf61727c78685f2f6e to your computer and use it in GitHub Desktop.
Downloading the RubyGems updated cert automatically
# https://gist.github.com/luislavena/f064211759ee0f806c88
$rubygems = &gem which rubygems
$ssl_cert_location = $rubygems.Replace(".rb","/ssl_certs/AddTrustExternalCARoot-2048.pem")
$ssl_cert_url = 'https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem'
# with curl installed
#&curl.exe -o "$ssl_cert_location" "$ssl_cert_url"
# without curl installed
(New-Object Net.WebClient).DownloadFile("$ssl_cert_url","$ssl_cert_location")
@ferventcoder
Copy link
Author

I've also thought about making this a chocolatey package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment