Nokogiri error with Jekyll on NixOS

Hi! I am trying to get local hosting of a static website working with Jekyll. I have been following this guide. Following the steps described in the blog works until I add the gem for my custom theme. At which point I get this error.


The solution given in the blog is to add
gem "nokogiri", "~> 1.10.10" to the Gemfile. Delete the Gemfile.lock and gemset.nix, and then rerun bundle and bundix.
When I do that I get this error.

Should I try pinning the github-pages gem to an earlier revision so that it does not require the more recent version of nokogiri? Or is there something else I am missing?

This sounds very similar to a problem we encountered when updating the packages in the nixpkgs jekyll package (jekyll: cannot update dependencies · Issue #202506 · NixOS/nixpkgs · GitHub).

In that case we fixed it by setting the BUNDLE_FORCE_RUBY_PLATFORM environment variable to true while running bundix (jekyll: force ruby platform when updating dependencies by raboof · Pull Request #202511 · NixOS/nixpkgs · GitHub, based on some of the discussion in "Could not find nokogiri..." when starting a new Rails project on macOS 11.4 · Issue #88 · nix-community/bundix · GitHub