From: Sandeep Guria Date: 2011-02-19T18:49:00+09:00 Subject: Re: Ruby(and programming) beginners question regarding 'NoMethodError' while using Hpricot Hi! Thanks! for the link Estanislau. it certainly did my work lot easier. I uploaded my 'almost' final program.What it does is it searches for some data for each company on BSE and writes it down on an excel sheet . First I collected all the links and saved it in an array 'x' Then i collect the data that i need and save it to an spreadsheet I defined earlier in the program. Lastly I write the spreadsheet to an excel File. I can control how many companies I want by changing the number of iterations(In this case 8). This program is running fine if the number of iteration is less than 6 otherwise, I get a error 'links.rb:34:in `block in
': undefined method `next_sibling' for nil:NilCla ss (NoMethodError) from links.rb:28:in `times' from links.rb:28:in `
'' I'm puzzled(like always!). All suggestions are welcome! Thank you Sandeep Guria Attachments: http://www.ruby-forum.com/attachment/5928/links.rb -- Posted via http://www.ruby-forum.com/.