Playing with my son on Lego NXT requires me to get Ruby in the mix just for fun. Here is the install notes that I used to get everything going.
cd /tmp
# Ruby Serial
svn export http://ruby-serialport.rubyforge.org/svn/trunk ruby-serial
cd ruby-serial
ruby extconf.rb
make
sudo make install
cd ..
# Install libusb
svn export https://libusb.svn.sourceforge.net/svnroot/libusb/trunk/libusb libusb
cd libusb
sh autogen.sh
./configure
make
sudo make install
cd ..
# Ruby USB
svn export svn://svn@svn.a-k-r.org/akr/ruby-usb/trunk ruby-usb
cd ruby-usb
ruby extconf.rb
make
sudo make install
cd ..
# Ruby NXT
gem install ruby-nxt
# Try it in IRB
require 'rubygems'
require 'nxt_comm'
comm = NXTComm.new
comm.connected?
comm.get_device_info
comm.get_firmware_version