If you are running into errors when installing the Ruby Gem Nokogiri and the error you are getting has to do with the library ‘libxml2’ not being available you will need to execute the following commands to fix it.
- sudo apt-get install build-essential
- sudo apt-get install libxslt-dev libxml2-dev
- bundle install
Original Error Message Reference:
checking for libxml/parser.h… no
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.