Installing Nokogiri on OpenBSD

While trying to upgrade Rails to the latest version I kept getting an error with Nokogiri. Looking at the error and this page here I was able to get the installation to work.

pkg_add libxml libxslt libiconv

bundle config build.nokogiri --use-system-libraries

bundle update

And it installed a treat. I’m not sure if other things previously installed helped or not.