- Install Puppet from MSI
- Note that the Ruby install path is something like
c:\program files\puppet labs\puppet\sys\ruby - Install Chocolatey in PowerShell with
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) - Close / re-open PowerShell
- Install Ruby Devkit -
choco install ruby2.devkit - Add Ruby to the beginning of the PATH using an 8.3 style path -
$Env:PATH = "C:\Progra~1\Puppet~1\Puppet\sys\ruby\bin;" + $Env:PATH(NOTE:dir /xinsidecmd.execan be helpful to find 8.3 style paths)- If done correctly
gem envshould contain a line withRUBY EXECUTABLE: C:/PROGRA~1/PUPPET~1/Puppet/sys/ruby/bin/ruby.exe - This part is absolutely critical, so if
gem envdoesn't have a bunch of 8.3 style paths, you've done something wrong
- If done correctly
- Configure DevKit for use with our vendored Ruby
cd \DevKit-2.0-x64ruby dk.rb initto generateconfig.yml- verify the generated
config.ymland ensure that it has an entry for the vendored Ruby like below (and add it if it doesn't), then runruby dk.rb installto associate the install with the devkit
---
- C:/progra~1/puppet~1/puppet/sys/ruby/bin- Now gems with native code can be installed! Verify with
gem install pry
https://github.com/ferventcoder/vagrant-windows-puppet/blob/master/boxes/shared/shell/config.yml#L15