# RSS Feed Implementation Issue

**URL:** <https://www.ruby-forum.com/t/rss-feed-implementation-issue/48679>\
**Category:** Rails\
**Created:** [November 23, 2005, 9:47am UTC](https://www.ruby-forum.com/t/rss-feed-implementation-issue/48679 "2005-11-23T09:47:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrea\_oSkSW](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f6c823/32.png) [@Andrea\_oSkSW](https://www.ruby-forum.com/u/Andrea_oSkSW)\
**Post date:** [November 23, 2005, 9:47am UTC](https://www.ruby-forum.com/t/rss-feed-implementation-issue/48679/1 "2005-11-23T09:47:57Z")

</div>

Hi All.

I was pleasantly surprised to see how easy it is to use a Builder  
template to format the xml for the RSS feed I’m implementing. There were  
lots of helpful example on the Web to follow.

My problem has to do with serving the feed.

The feed is initiated in the rss method in my xml\_controller; there’s  
also an rss.rxml.

If I point my browser to localhost:3000/xml/rss, the content appears in  
xml format and looks _ **just right** _. But my feed reader chokes when I  
give it that URL.

If I point to localhost:3000/xml/rss in my browser and do a “save as  
/public/xml/rss.xml”, my feed reader has no trouble finding the file and  
displays its contents flawlessly.

Does an actual .xml file really need to be saved somewhere? I didn’t  
think that was necessary?

Any hints would be greatly appreciated.

What am I missing?

Thanks,

AOK

---

<div class="post-metadata">

**Author:** ![Andrea\_oSkSW](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f6c823/32.png) [@Andrea\_oSkSW](https://www.ruby-forum.com/u/Andrea_oSkSW)\
**Post date:** [November 23, 2005, 11:30am UTC](https://www.ruby-forum.com/t/rss-feed-implementation-issue/48679/2 "2005-11-23T11:30:27Z")

</div>

On Wednesday 23 Nov 2005 08:47, Andrea O. K. Wright wrote:

> If I point my browser to localhost:3000/xml/rss, the content appears in  
> xml format and looks _ **just right** _. But my feed reader chokes when I  
> give it that URL.  
> Any hints would be greatly appreciated.  
> What am I missing?

Are you setting the MIME type correctly (in your xml\_controller, on the  
rss  
action)? Should be:

headers[‘Content-Type’] = “application/rss+xml”

~Dave

–

Dave S.  
Rent-A-Monkey Website Development  
Web: [http://www.rentamonkey.com/](http://www.rentamonkey.com/)

---

<div class="post-metadata">

**Author:** ![Andrea\_oSkSW](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f6c823/32.png) [@Andrea\_oSkSW](https://www.ruby-forum.com/u/Andrea_oSkSW)\
**Post date:** [November 23, 2005, 6:59pm UTC](https://www.ruby-forum.com/t/rss-feed-implementation-issue/48679/3 "2005-11-23T18:59:44Z")

</div>

Thank you for your help Dave.

My feed reader was able to read the feed with that format. But when I  
use  
“application/rss+xml” with Firefox, I get the “Open With\Save As” dialog  
when I browse to localhost:3000/xml/rss and IE gives me the message that  
it  
“cannot download rss from localhost”.

I switched to “application/xml; charset=utf-8” per  
[Peak Obsession](http://wiki.rubyonrails.com/rails/pages/HowtoChangeTheContentType). With  
this  
format both Firefox and IE quietly display the feed content – and the  
feed  
reader is also fine with the URL “localhost:3000/xml/rss”.

AOK
