On my ubuntu 10.04 host I use Nokogiri in a Ruby script.
doc = Nokogiri::HTML(open("http://www.google.com.hk"))
That works fine and I receive data.
On my product host running CentOS 5, it fails. There is no error, it returns a single line of data only.
#<Nokogiri::HTML::Document:0x43a5332 name="document" children=[#<Nokogiri::XML::DTD:0x43a5094 name="html">]>
Where is the data in #<Nokogiri::XML::DTD:0x43a5094 name="html">?
Nokogiri uses libxml2 to do much of the heavy lifting. It is probable that you have a bad install of libxml2 on your production environment. Install a clean, updated version of libxml2 and then re-install Nokogiri (ensuring that it uses your new install).
For more information, read “What to do if libxml2 is being a jerk”.