nokogiriでhtmlデータが取得できない

困ったら公式ドキュメント読みましょうシリーズ。



CenoOS上でnokogiriでhtmlデータがなぜか取得できない現象が発生。
gemのバージョン変えたり、小一時間ぐらいいろいろやってみたけどダメでしたが
Nokogiri公式ドキュメントにしっかり記載されてました。

In practice, though, CentOS 5 (and RHEL5) come installed with libxml 2.6.26 which, while not as offensively out-of-date as Mac Leopard, is still pretty damn old (released June 2006) and has known issues.

If you’re affected by any known bugs or are seeing odd behavior, you may want to consider uninstalling the RPMs for libxml2 and libxslt, and building them from source.

libxml2とlibxsltのバージョンに問題があるようで、uninstallしてソースからコンパイルすればOKでした。
ふぅ。