Check out this link – http://www.nokogiri.org/tutorials/installing_nokogiri.html
That link suggests plenty solutions for all type operating systems. After searching solutions for hours in other links ending up none the wiser and even more confused, I cannot believe why I overlooked this website!
The problem solved by solution stated on the above mentioned website:
Using Nonstandard libxml2 / libxslt installations
- you’ve got libxml2 and/or libxslt installed in a nonstandard place,
- and you don’t have
you can use command-line parameters to the
gem install command to specify build parameters.
If you’ve got the proper
gem install nokogiri — \ –use-system-libraries \ –with-xml2-config=/path/to/xml2-config \ –with-xslt-config=/path/to/xslt-config