Topic: Generate simple RSS reader

here's my code to generate the rss reader. Ideally i want to parse the RSS news site, then scrap out the headlines, description, link(URL), and date.

    def test

    rss = nil
    @rss = RSS::Parser.parse('')
    rescue RSS::InvalidRSSError
    @rss = RSS::Parser.parse('', false)

    a = nil
    process "a", :new => :text, :title => :text, :link => "@href", :desc => :text,:date =>   :date
    rss = = ["rss-feed.xml"]
    rss.title = ["the Satr RSS-feed"] = [""]
    rss.desc = ["the Star RSS-feed generated by RubyRSS"] =
    1.upto(10) { |i|
        rss.items <<
        "title-" + i.to_s,
        "#" + String(i),
    rss.generate "rss2.0"
i found errors:

undefined method `parameters' for "a":String

RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace

C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:122:in `set_session_options_without_components'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/components.rb:178:in `set_session_options'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:116:in `process'
#{RAILS_ROOT}/app/controllers/new_controller.rb:31:in `parse'
Can anyone plz tell me wat's wrong wit my code.
So sorry if i am asking stupid question, i am newbbie:D
thanks, and happy new year

Re: Generate simple RSS reader

this is my code to grab headlines, link and description for a news rss site eg. "" and it works.

def parse
        url = ''
        feed = RSS::Parser.parse(open(url),false)
        puts "===Channel:#{}==="
        feed.items.each do |item|
            puts item.title
            puts "(#{})"
            puts item.description
            puts "----------------------------------------------------------------------"

The code works pretty well.The headlines, links and descriptions for every news are grabbed and appears in the command prompt.
Now my question is:
instead of showing the headlines, links and descriptions for every news in command prompt, i wanna to add it into a phpMyadmin database, arrange it neatly.

Any suggestion?
big_smile thanks