Ruby and RSS2 Feed not displaying image -


I am trying to create a simple RSS feed which I can later pass on FeedBurner but the RSS feed has images Can not show all.

Besides, what I've read from xml.instruct! Being at the top, the IE may complain that this is not a valid feed. is it true?

My code looks like this

  xml.instruct! Xml.rss "version" = & gt; "2.0", "XMLN DC" => "Http://purl.org/dc/elements/1.1/" do xml.channel do xml.title "store" xml.link url_for: only_path = & gt; Wrong, controller = & gt; 'Product' xml.description "store" xml.pubDate @ products.first.updated_at.rfc822 if @products.any? @ Products.each do | Products | Xml.item do xml.title product.name xml.pubDate (product.updated_at.rfc822) xml.image do xml.url domain_host + product.product_image.url (: small) xml.title "store" xml.link url_for: only_path = & Gt; Wrong, controller = & gt; 'Product' end xml.link url_for: only_path = & gt; Wrong, controller = & gt; 'Product',: action = & gt; 'Show' ,: ID = & gt; Product.permalink xml.description product.fine_print xml.guid url_for: only_path = & gt; Wrong, controller = & gt; 'Product',: action = & gt; 'Show' ,: ID = & gt;  

/ P>

  & Lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RSS version = "2.0" xmlns: DC = "http://purl.org/dc/elements/1.1/" & gt; & Lt; Channel & gt; & Lt; Title & gt; Test me & lt; / Title & gt; & Lt; Link & gt; Http: // localhost: 3000 / products & lt; / Link & gt; & Lt; Details & gt; Test me & lt; / Description & gt; & Lt; PubDate & gt; Mon, 21 June 2010 14:51:11 + 0000 & lt; / PubDate & gt; & Lt; Items & gt; & Lt; Title & gt; Cylinder & lt; / Title & gt; & Lt; PubDate & gt; Mon, 21 June 2010 14:51:11 + 0000 & lt; / PubDate & gt; & Lt; Image & gt; & Lt; URL & gt; Http: // localhost: 3000 / assets / products / 1 / small / product_1.jpg & lt; / URL & gt; & Lt; Title & gt; Test me & lt; / Title & gt; & Lt; Link & gt; Http: // localhost: 3000 / products & lt; / Link & gt; & Lt; / Image & gt; & Lt; Link & gt; Http: // localhost: 3000 / products / 1 & lt; / Link & gt; & Lt; Details & gt; & Amp; Amp; Lt; P & amp; Gt; & Amp; Lt; H2 & amp; Gt; Cylinder 2467 D & amp; Lt; / H2 & amp; Gt; This cylinder was designed for cruelty and high performance; & Lt; / P & gt; & Lt; / Description & gt; & Lt; GUID & gt; Http: // localhost: 3000 / products / 1 & lt; / GUID & gt; & Lt; / Item & gt; & Lt; / Channel & gt; & Lt; / Rss & gt;  

with description - in file_tag - from Firefox

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RSS version = "2.0" xmlns: DC = "http://purl.org/dc/elements/1.1/" & gt; & Lt; Channel & gt; & Lt; Title & gt; Test me & lt; / Title & gt; & Lt; Link & gt; Http: // localhost: 3000 / products & lt; / Link & gt; & Lt; Details & gt; Test me & lt; / Description & gt; & Lt; PubDate & gt; Mon, 21 June 2010 14:46:54 + 0000 & lt; / PubDate & gt; & Lt; Items & gt; & Lt; Title & gt; Cylinder & lt; / Title & gt; & Lt; PubDate & gt; Mon, 21 June 2010 14:46:54 + 0000 & lt; / PubDate & gt; & Lt; Image & gt; & Lt; URL & gt; Http: // localhost: 3000 / assets / products / 1 / small / product_1.jpg & lt; / URL & gt; & Lt; Title & gt; Test me & lt; / Title & gt; & Lt; Link & gt; Http: // localhost: 3000 / products & lt; / Link & gt; & Lt; / Image & gt; & Lt; Link & gt; Http: // localhost: 3000 / products / 1 & lt; / Link & gt; & Lt; Details & gt; & Amp; Amp; Lt; IMG alt = "product_1" src = "/ property / product / 1 / small / product_1.jpg? 1276967922" / & amp; Amp; Amp; Lt; P & amp; Amp; Gt; & Amp; Amp; ; Amp; Lt; H2 & amp; Gt; Cylinder 2467 D & amp; Lt; / H2 & amp; GT; This cylinder toughness and high performance & amp; Amp; Lt; / P & amp; Gt; & Lt; / Description & gt; & Lt; GUID & gt; Http: // localhost: 3000 / products / 1 & lt; / GUID & gt; & Lt; / Item & gt; & Lt; / Channel & gt; & Lt; / Rss & gt;  

Do your image paths are relative or do they have full URIs in processing? Double-check the source created by your script for this type of thing Google Reader will try and fix it, but not every RSS tool will do the same.


Comments