Trying to install Ruby, Cucumber and Firewatir on Ubuntu Maverick leads to a problem i'm sure i've seen before.  I've installed Ruby/Rails numerous times on Linux boxes and it never ever works first time.  For the amount of time Ruby has been around you'd think they'd get it to work on a Linux/Debian install easily (like PHP/MySQL/Apache), but no, always a frigging problem.

Anyway, i've used apt-get to install ruby and rubygems.  From that you can then install the cucumber gem ok but the firewatir gem breaks:

 $ sudo gem install firewatir
ERROR:  Error installing firewatir:
        hoe requires RubyGems version >= 1.4. Try 'gem update --system' to update RubyGems itself.
 

If you then try sudo gem update --system you'll get:

$ sudo gem update --system
ERROR:  While executing gem ... (RuntimeError)
    gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your
Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.
If you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable,
but please remember that this is completely unsupported by Debian.
 

The reason it won't work is that the packaged version that's in the Maverick repositories is 1.3x.  You need to remove the package using apt-get and then use the latest source instead:

 $ sudo apt-get remove rubygems

Then download rubygems from their website at http://rubygems.org/pages/download.  Once you've extracted it and gone into the directory run:

 $ sudo ruby Downloads/rubygems-1.6.1/setup.rb 
RubyGems 1.6.1 installed 
 

You'll have to re-install the Cucumber gem but now the Firewatir gem should work:

 $ sudo gem install firewatir
Fetching: xml-simple-1.0.14.gem (100%)
Fetching: rake-0.8.7.gem (100%)
Fetching: hoe-2.9.1.gem (100%)
Fetching: s4t-utils-1.0.4.gem (100%)
Fetching: user-choices-1.1.6.1.gem (100%)
Fetching: commonwatir-1.8.0.gem (100%)
Fetching: firewatir-1.8.0.gem (100%)
Successfully installed xml-simple-1.0.14
Successfully installed rake-0.8.7
Successfully installed hoe-2.9.1
Successfully installed s4t-utils-1.0.4
Successfully installed user-choices-1.1.6.1
Successfully installed commonwatir-1.8.0
Successfully installed firewatir-1.8.0
7 gems installed
 

More info here:

http://stackoverflow.com/questions/3643870/gem-update-system-is-disabled-on-debian-error