Archive for the ‘ruby’ Category

* Require RubyGems

Posted on February 19th, 2010 by Dave Johnson. Filed under ruby.

I have never really written much ruby outside of a Rails app and so when I wanted to write a short script for a cron job.

I kept getting an error like:

‘require’: no such file to load — some_gem (LoadError)

In the end it was all because I had forgotten to first require rubygems!

It was a hard thing to find an answer to from The Google.

Tags: , , .

* Firebug “Copy XPath”

Posted on June 6th, 2007 by Dave Johnson. Filed under Uncategorized, rails, ruby.

I have been playing around with the Ruby plugin Hpricot the last few days while I have been creating a news reading tool. It is pretty darn cool and hopefully I will get my project done this weekend.

However, the point of this post is Just a note for others using Firebug to get XPath expressions for use in Hpricot - don’t do it!!! Well ok, you can do it, but make sure you watch out for any <tbody> elements that Firebug sneaks in there that don’t exist … I spent _way_ too long figuring that one out.

Tags: , .