From: Sandeep Guria Date: 2011-02-25T18:33:19+09:00 Subject: Re: Ruby(and programming) beginners question regarding 'NoMethodError' while using Hpricot Hi! I tried to find the class of the object on which I am using the method next_sibling using the code below is returning (by iterating it for 25 times ) >sheet1[num,1]=doc.search('td[text()="PE ratio"]').first >puts num # num is |num| >puts sheet1[num,1].class It turns out it gives 'nil class' for 13th, 15th 16th and 24th iteration. So 'next_method' gives a no method error. Please help me with this problem Attachments: http://www.ruby-forum.com/attachment/5964/scraper.rb -- Posted via http://www.ruby-forum.com/.