Forum: Ruby Problem generating RSS feed with enclosures using FeedTools

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Alex Castro (Guest)
on 2005-12-31 13:39
(Received via mailing list)
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
This topic is locked and can not be replied to.