Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
For DPK installations on Windows, this script will fix the RubyGems CA issue and add the Puppet-based RubyGems location to `PATH`
# Enable RubyGems
# The RubyGems included with the DPK can't download from due to an oudated SSL Certificate
# invoke-webrequest; . $env:TEMP\enableRubyGems.ps1
$puppetGemFolder = Resolve-Path 'C:\Program Files\Puppet Labs\Puppet\sys\ruby\lib\ruby\*\rubygems\ssl_certs\'
#Invoke-WebRequest -OutFile $puppetGemFolder\RubyGemsCA.pem
Invoke-WebRequest -OutFile $puppetGemFolder\RubyGemsCA.pem
$env:PATH+=";C:\Program Files\Puppet Labs\Puppet\sys\ruby\bin"
[Environment]::SetEnvironmentVariable("PATH", $env:PATH, "Machine")

This comment has been minimized.

Copy link
Owner Author

@iversond iversond commented Jun 3, 2021

Thanks for the updated URL @daviddickgrcc

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