Charlie Sharpsteen
06/04/2026, 2:52 PMPS C:\> & 'C:\Program Files\Puppet Labs\Puppet\puppet\bin\gem.bat' install nokogiri
Fetching nokogiri-1.19.3.gem
Fetching mini_portile2-2.8.9.gem
Successfully installed mini_portile2-2.8.9
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/gems/3.2.0/gems/nokogiri-1.19.3/ext/nokogiri
C:/Program\ Files/Puppet\ Labs/Puppet/puppet/bin/ruby.exe extconf.rb
checking for whether -std=c99 is accepted as CFLAGS... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
...
Now, because we're using the same x64-mingw-ucrt architecture as upstream Ruby, we can install pre-compiled gems and avoid having dev tools on the agent node 🥳
PS C:\> & 'C:\Program Files\Puppet Labs\Puppet\puppet\bin\gem.bat' install nokogiri
Successfully installed nokogiri-1.19.3-x64-mingw-ucrt
Parsing documentation for nokogiri-1.19.3-x64-mingw-ucrt
Done installing documentation for nokogiri after 5 seconds
1 gem installed