ruby google charts api wrapper, RFC2396 and ruby open-uri woes

January 11, 2008

UPDATE:found a simple fix/hack for the googlecharts gem

Uhh!, this for sure is one of the more scary regular expressions you normally encounter. Its URI::REGEXP::PATTERN::ABS_URI from uri/common.rb:137. Looks complete, doesn't it? And still it fails to grasp my seemingly valid Google Charts URL which is:|requests&chd=s:Fb9JJfgZ,Fb9KJfgq&cht=lc&chs=300x200

It's the googlecharts gem which creates this URL here(not me!), but than bails out when trying to download an image from it.

/opt/local/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?):...

Now, who is right? Google? The URI RFC2396? The googlecharts gem? Debugging such things are the less thrilling moments in life.

Besides that, even when bailing out on this one, the googlecharts gem feels good. It offers efortless chart creation and basic cases are already covered, the advanced stuff will follow i think. Go check it out when in search for an easy charting solution. Googlecharts gem felt better to me than the gchartrb which is another wrapper for the same service, but your milage may vary.

have fun

Technorati Tags: , ,

share this: