I have done all kinds of research and tried many different things. I know this question has been answered many times, but none of the suggested solutions are working for me.
I had similar problem and just solved this way:
In my case, I have RVM installed, and I had @global and @project gem sets. Both of them had nokogiri installed and one of them had built with with different libxml.
Rebuilding both of them (I have reason to do this) solved the problem.
Hope this helps..