The nokogiri install locally magic.
If you’re building your own libxslt and libxml2 because you’re on shared hosting, the *right* gem install magic is :
gem install nokogiri — —with-xml2-lib=<YOUR_INSTALL_DIR>/lib —with-xml2-include=<YOUR_INSTALL_DIR>/include/libxml2 —with-xslt-lib=<YOUR_INSTALL_DIR>/lib —with-xslt-include=<YOUR_INSTALL_DIR>/include/
You should be ./configure —prefix=<YOUR_INSTALL_DIR> when you compile libxml2 and libxslt.
The docs recommend
gem install nokogiri — —with-xml2-lib=/home/joe/builds/lib \
—with-xml2-include=/home/joe/builds/include/libxml2 \
—with-xslt-lib=/home/joe/builds/lib \
—with-xslt-include=/home/joe/builds/include/libxslt
This is close, but not close enough if you’re not used to compiling your own libraries. Taking a peek at mkmf.log is pretty helpful here too. Good luck!!!!