You might also consider the mechanize library:
http://mechanize.rubyforge.org/mechanize/GUIDE_rdoc.html

e.g.

require 'rubygems'
require 'mechanize'

Mechanize.new.get("http://www.apartment-directory.info/alabama/0") do |page=
|
  page.search('//tr').each do |tr|
    tds =3D tr.search('./td')
    puts tds[0].text.chomp rescue nil
    puts tds[2].text.chomp rescue nil
    puts tds[3].text.chomp rescue nil
    puts
  end
end

This sample script as-is is too greedy; it loops over every row of
every table table instead of just the interesting one.

$ ruby i.rb
[some garbage from other tables]
...
Aquadome Apartment
1619 8th Street Southwest
Decatur,=A0=A0AL=A0=A035601

Arbor Park Apartments
175 Sloan Avenue East
Talladega,=A0=A0AL=A0=A035160

Arbor Place Apartments
515 Fox Run Parkway No. 9A
Opelika,=A0=A0AL=A0=A036801

Arbor Pointe Apartments
100 Dairy Road
Mobile,=A0=A0AL=A0=A036612

Arboretum Apartments
1800 Arboretum Circle
Birmingham,=A0=A0AL=A0=A035216

Arbors On Taylor
485 Taylor Road
Montgomery,=A0=A0AL=A0=A036117

Arrow Head Apartments
129 South Union Avenue
Ozark,=A0=A0AL=A0=A036360
...