From: Fred Phillips Date: 2007-05-28T00:38:21+09:00 Subject: RSS::Parser trouble ------=_Part_104684_15837207.1180280301276 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Whenever I try to run the code below I always get given a "in `rss': undefined method `parse' for :Parser:Symbol (NoMethodError)" error. Anyone know what is wrong? require 'rss/1.0' require 'rss/2.0' def rss(url,link,number) content = '' open(url) do |s| content = s.read end @feed = RSS:Parser.parse(content,false) @items = '' if !@link i = 0 while i < 5 do j = i+1 @items = items,j,'. ',@feed.items[i],', ' i = j end return @items else x = number.gsub(/\r/,'') x = x.gsub(/\n/,'') x = x.to_i x = x -1 @title = @feed.items[x].title @link = @feed.items[x].link return @title, ': ', @link end end rss("http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml ",false,0) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFGWaXt2vy7v+d+psQRAgXZAKCmBxi4DknkIwrF8AtMH3v27fRX3wCgu1lV KQ0IdYbZGYaAJVLNrWqrpWs= =nPUi -----END PGP SIGNATURE----- ------=_Part_104684_15837207.1180280301276--