Anyone use "syndication" gem?

It's a new gem recently released for handling RSS/Atom feeds.

I've installed it on my powerbook and it's generating an error when I try to run the example that was included with the package.

I installed it using "gem install syndication" and it installs correctly. When I try to run the example. I get an error.

The example is:

# RSS Syndication example:

···

#
# Output Yahoo news headlines, dated.

require 'open-uri'
require 'syndication'

parser = Syndication::RSS::Parser.new
feed = nil
open("http://rss.news.yahoo.com/rss/topstories") {|file|
   text = file.read
   feed = parser.parse(text)
}
chan = feed.channel
t = chan.lastbuilddate.strftime("%H:%I on %A %d %B")
puts "#{chan.title} at #{t}"
for i in feed.items
   t = i.pubdate.strftime("%d %b")
   puts "#{t}: #{i.title}"
end

The error I get is:

      yahoo.rb:7:in `require': No such file to load -- syndication/rss (LoadError)

I tried uninstalling and reinstalling the gem. I have installed a few other gems and am able to access them correctly.

Hi Kevin,

I installed Syndication on WindowsXP and tried your example. I got
the same error you got.

I then used a utility to snoop on file system activity, and saw that
require was looking for syndication.rb in the wrong place. The
requires should actually be:

require 'open-uri'
require 'syndication/syndication'
require 'syndication/rss'

With these changes, your example now works OK on my system.

Hope this helps.

Wayne Vucenic
No Bugs Software
"Ruby and C++ Agile Contract Programming in Silicon Valley"