From: Allison Newman Date: 2006-12-04T02:48:34+09:00 Subject: Intermittant problem with Hpricot I've run into a wierd problem with the Hpricot gem. I don't know if this is a problem with gems in general on my system, or if it's specific to Hpricot, so I'm posting here. Basically I have code as follows: require 'rubygems' require 'net/http' require 'uri' require_gem 'hpricot' class Page def some_function(html_text) doc = Hpricot(html_text) doc.search("/html/body//img").each do |img| logger.debug("== Found an image: #{img} ==") src = img[/src="/] logger.debug("src = #{src}") end end end When the function is called, sometimes I get a message saying that function Hpricot does not exist for the object of type Page. this continues for the entire programming session. But sometimes, when I sit down to work on the project, the code works! It continues working until I restart the Rails server (this is a Rails project running on MacOSX). Does anyone have any idea what might be causing this problem, and how to correct it? Alli -- Posted via http://www.ruby-forum.com/.