Hpricot

gem hpricot is the HTML parser we use for the donation_helper.rb, specifically in mozilla_parser.

The problems with parsing HTML seem to be related to the lack of closing tags in the legacy Firefox bookmark files (lack of closing tags). This affects both nokogiri and hpricot version 0.7+.

"sudo gem uninstall hpricot" yields a list of choices. For a cheap quick fix, uninstall back to version 0.6.164 and Heather's original code for donation_helper.mozilla_parser will work again.

Note that require_gem accepted a second "--version" argument, but that is now deprecated. I did not discover a way to require a specific version of a gem, so instead just uninstalled the more recent versions.

I shared up the mozilla_parser version with the nokogiri code commented out, in case we ever switch parsers. Nokogiri has problems reading donated bookmark files smaller than 15k because the Rails Literati decided to use StringIO instead of FileIO for files that small. There is no documentation for how to convert StringIO to File.

Updating Ruby to version 1.8.7 fixed the dependency problem and hpricot 0.8.1 installed OK.

In the meanwhile, I am placing this note in the wiki for future reference.

--John