Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problem generating RSS feed with enclosures using FeedTools library

Thread Tools

Problem generating RSS feed with enclosures using FeedTools library

Alex Castro
Posts: n/a

I'm using the FeedTools library to generate an RSS feed with a media
enclosure. Unfortunately, I can't seem to figure out how to add the
enclosure data.

Here is the code:

require 'rubygems'
require_gem 'feedtools'

feed =
feed.title = 'Odeo' = ''
feed.description = 'Alex Channel'

feed.entries <<

feed.entries[0].title = 'MacCast 12.22.2005'
feed.entries[0].link = ''
feed.entries[0].content = 'A podcast about all things Macintosh. For
Mac geeks, by Mac geeks. Show 110. 1GB iPod Shuffles sold out until
January. Apples marketing group was considering a 1GB iPod Nano. Will
the first laptop...'
feed.entries[0].author = 'MacCast'
feed.entries[0].issued = 'Thu, 22 Dec 2005 10:04:35 GMT'
feed.entries[0].media_thumbnail_link =

feed.entries[0].enclosures =

feed.entries[0].enclosures.url =
feed.entries[0].enclosures.type = "audio.mpeg"
feed.entries[0].enclosures.file_size = "24467810"

xml = feed.build_xml('rss', 2.0)
puts xml

I receive the following error message:

NoMethodError: undefined method `size' for
method enclosures in feed_item.rb at line 1133

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Post RSS feed w/o Scott Gordo HTML 5 08-29-2006 01:34 AM
RSS Feed - need an Idiot's Guide to RSS News on my website HTML 5 02-25-2005 11:01 AM
finding audio/mpeg enclosures in RSS feeds Patrick Flaherty XML 1 10-02-2004 11:16 PM
Searches in multiple RSS feeds -> new rss feed Motta XML 1 06-09-2004 10:55 PM