There is Mechanize (http://mechanize.rubyforge.org/) which uses Nokogiri (nokogiri.org/) internally and thus nicely supports CSS and XPATH expressions.
There is also Capybara, usually used as a testing framework, but you can easily navigate, chose a backend (Selenium/Webkit for compatibility, mechanize for speed): https://github.com/jnicklas/capybara