UPDATE: Fixed
I found the answer in another thread. The workaround I used is to tell Nokogiri to use the system libraries instead:
N
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install