From: fabsy Date: 2006-08-19T03:15:07+09:00 Subject: Re: hpricot Chris Gehlker skrev: > On Aug 18, 2006, at 10:55 AM, fabsy wrote: > > > I'ts really strange.. It works in irb but not when im pasting in in a > > .rb file.. > > Maby I should re-install it? > > Maybe. It seems to me that if it weren't installed correctly it > wouldn't work in irb either but I can't think of anything better to try. > -- > Vegetarians eat Vegetables, Humanitarians frighten me Yeah.. re-installed it but i still get the same error.. I just pasted: require 'rubygems' require 'hpricot' require 'open-uri' doc = Hpricot(open("http://qwantz.com/")) (doc/"p/a/img").each do |img| puts img.attributes['class'] end into a file and tried to run it.. It gave me the "hej.rb:1: parse error, unexpected tIDENTIFIER, expecting $ require 'open-uri'" But it still works when i paste it directly into irb..