<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Squash &#187; Feed Parser</title>
	<atom:link href="http://balpreetpankaj.com/blog/category/feed-parser/feed/" rel="self" type="application/rss+xml" />
	<link>http://balpreetpankaj.com/blog</link>
	<description>Just another weblog</description>
	<lastBuildDate>Sun, 16 Oct 2011 23:32:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rfeedparser and Hpricot</title>
		<link>http://balpreetpankaj.com/blog/2008/11/15/rfeedparser-and-hpricot/</link>
		<comments>http://balpreetpankaj.com/blog/2008/11/15/rfeedparser-and-hpricot/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 05:49:45 +0000</pubDate>
		<dc:creator>balpreetspankaj</dc:creator>
				<category><![CDATA[Feed Parser]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[feedparser]]></category>
		<category><![CDATA[hpricot]]></category>
		<category><![CDATA[Mark Pilgrim]]></category>
		<category><![CDATA[rfeedparser]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://balpreetpankaj.com/blog/?p=19</guid>
		<description><![CDATA[RFeedParser is one of the ruby gems to parse rss feeds. Its a translation of Mark Pilgrims's Universal Feed Parser from Python into Ruby. It has a few dependencies and requires you to install a few other gems. The installation instructions are simple and the usage is simple.
One of the dependencies for this was hpricot. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rfeedparser.rubyforge.org/">RFeedParser</a> is one of the ruby gems to parse rss feeds. Its a translation of Mark Pilgrims's <a href="http://feedparser.org/">Universal Feed Parser</a> from Python into Ruby. It has a few dependencies and requires you to install a few other gems. The installation instructions are simple and the usage is simple.</p>
<p>One of the dependencies for this was <a href="https://code.whytheluckystiff.net/hpricot/">hpricot</a>. Everything was working fine till one day, I updated my hpricot gem and did a cleanup of my rubygems.  I started getting an error:</p>
<p><code>balpreet-pankajs-macbook:digg balpreetpankaj$ ruby bloo.rb<br />
/Library/Ruby/Site/1.8/rubygems.rb:142:in `activate': can't activate hpricot (= 0.6, runtime), already activated hpricot-0.6.164 (Gem::Exception)<br />
	from /Library/Ruby/Site/1.8/rubygems.rb:158:in `activate'<br />
	from /Library/Ruby/Site/1.8/rubygems.rb:157:in `each'<br />
	from /Library/Ruby/Site/1.8/rubygems.rb:157:in `activate'<br />
	from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'<br />
	from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'<br />
	from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'<br />
	from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'</code></p>
<p>After a little digging arnd with rubygems, I figured out that the rfeedparser has a requirement of running with a hpricot gem with version = 0.6. I changed that to >= 0.6 and things started working fine. I was using version 0.9.951 of rfeedparser. If you use rfeedparser and run into a similar problem, this is how you fix it:</p>
<p>1) Update the gemspec for rfeedparser. Go to your gem installation dir. You can find this by doing:<br />
    <code>gem env gempath</code><br />
    Then edit the $gemPATH/specifications/rfeedparser0.9.951.gemspec and update all references of hpricot from "=0.6" to ">=0.6".<br />
2). Go to $GEMPATH/gems/rfeedparser-0.9.951/lib/rfeedparser.rb and again update the reference of hpricot.</p>
<p>This should get you rolling with all new versions of hpricot.   </p>
]]></content:encoded>
			<wfw:commentRss>http://balpreetpankaj.com/blog/2008/11/15/rfeedparser-and-hpricot/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

