I would look at Capybara before using webdriver directly in Ruby. With Capybara, with one line of code, you can change from using webdriver, to using the native rack driver, or a full headless browser setup like capybara-webkit, or akephalos for headless httpunit (which runs javascript).
https://github.com/jnicklas/capybara
drivers:
https://github.com/thoughtbot/capybara-webkit
https://github.com/bernerdschaefer/akephalos