I think that the problem is being caused by your Ruby interpreter.
You should not use Ruby 1.9.0: it is not stable and has been abandoned
for 1.5 years. The 1.9.x series remains under development, but makes
significant changes to the Ruby language, which are probably triggering
the bug you encountered.
To run AutomateIt and other Ruby apps that you care about, please use a
current release of Ruby 1.8.6, Ruby 1.8.7 or Ruby Enterprise Edition (REE).
Also, Ubuntu 7.04 "Feisty Fawn" reached its end-of-life almost a year
ago, which means there are no more packages or security updates being
published for it. You really should upgrade to Ubuntu 8.04 'Hardy Heron"
if you need stability, or Ubuntu 9.04 "Jaunty Jackalope" if you need the
latest software versions.
Ubuntu 8.04 and newer, plus the current releases of Debian, Fedora and
Gentoo include stable, patched and modern Ruby versions that you can use.
Here's a sample shell script that installs Ruby and its dependencies on
Ubuntu 8.04, and checks out some recipes via git. Please read through
what the commands do -- for example, you probably don't want the last bit:
http://github.com/igal/osbp_automateit/blob/master/bootstrap.sh
I hope this helps.
-igal