Skip to content

Commit

Permalink
Windows Nokogiri requires specifying the lib paths
Browse files Browse the repository at this point in the history
Non-Windows worked correctly with only specifying
`env["NOKOGIRI_USE_SYSTEM_LIBRARIES"] = "true"` but Windows requires
more. It doesn't hurt the other systems to do this, it is just unecessary
there.

Signed-off-by: tyler-ball <tball@chef.io>
  • Loading branch information
tyler-ball committed May 5, 2020
1 parent e45ef9b commit 9b17d95
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion omnibus/config/software/gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,24 @@
# install the whole bundle first
bundle "install --jobs 10 --without #{excluded_groups.join(" ")}", env: env

# We want to force compilation of the Nokogiri gem, not use the
# precompiled binaries (-x86_64-linux).
gem "uninstall nokogiri --all --ignore-dependencies", env: env
gem "install nokogiri -v 1.11.0.rc2 --platform ruby --no-document", env: env
gem_command = [
"install nokogiri",
"-v 1.11.0.rc2",
"--platform ruby",
"--no-document",
"--",
"--use-system-libraries",
"--with-xml2-lib=#{install_dir}/embedded/lib",
"--with-xml2-include=#{install_dir}/embedded/include/libxml2",
"--with-xslt-lib=#{install_dir}/embedded/lib",
"--with-xslt-include=#{install_dir}/embedded/include/libxslt",
"--without-iconv",
"--with-zlib-dir=#{install_dir}/embedded",
]
gem gem_command.join(" "), env: env

appbundle "chef", lockdir: project_dir, gem: "chef", without: %w{docgen chefstyle omnibus_package}, env: env

Expand Down

0 comments on commit 9b17d95

Please sign in to comment.