OK I resolved it and it’s nothing to do with nokogiri specifically - but yet another reason not to use git submodules.
Here’s the details
- We have a gem containing all our gem dependencies that is in a submodule
- we have a initial step in our netlify.toml build step that updates ALL the submodules to latest before ruby build
- I had added nokogir to the the gem but not updated the ref in the using git repo (as I’m used to the build step refreshing them all)
- the netlify build does a
git clonebefore reading the gemfile and fetching all the required gems.
So tha failure was the nokogiri gem was never fetched as the submodule ref was to the version before I added nokogiri! The error correctly said it’s wanted but not in the image as it had not been fetched. D’oh
That took a while to figure.
I don’t expect a solution from you as it’s unusual to put all the deps in a gem AND put that in a submodule - don;t ask - I inherited this architecture 
Thanks