After wracking my brains around a strange issue installing Nokogiri, wmoxam in #rubyonrails and I figured out how to get it to install.
Problem: You go to install nokogiri, either with bundler or with a straight “gem install nokogiri”, and you get an error like the following:
In your wisdom, you decide to jump over to Aaron Paterson’s Installing Nokogiri page, where he tells you to install the libs, libxml2 and libxslt, manually and configure the gem install to those libs with flags … but it still doesn’t work.
Solution: You are probably using RVM, right? Yeah, we’ll when you installed ruby 1.9.* with it, it was probably old. Update your rvm install and re-install ruby with the new RVM version, and you will be green.
rvm update head
rvm --force install 1.9.2
gem install bundle
## in your rails app
Installing nokogiri (1.4.2) with native extensions