From: Allison Newman Date: 2006-12-04T03:47:35+09:00 Subject: Re: Intermittant problem with Hpricot David Vallner wrote: > > This might or might not be related, but I think there was some change to > the semantics of require_gem lately (appeared in a post or thread a week > or two ago?), or HPricot might have been changed not to load any files > when the gem is loaded. > > Either way, (I think) you should just use #require, not #require_gem and > directly require files inside the Hpricot gem - Rubygems is intended to > be as transparent to use as possible, and at least personally I prefer > code agnostic to how a certain library might be packaged on the given > system. > > Try using require 'hpricot' instead or require_gem 'hpricot' and see if > that helps? > > Also, Rails has a hard dependency on rubygems, so you don't need to > require those in Rails code. > > David Vallner Yup, that seems to fix the problem, thanks. It's still wierd that the problem was intermittent though!!!! I think I may leave the code in the Hpricot.parse form, just to be sure, until I have some time to more fully investigate the problem. -- Posted via http://www.ruby-forum.com/.