To add Selenium to your Ruby environment run the following command from a command-line.
gem install selenium-webdriver
There are many other Selenium gems out there, but this is the official, maintained gem.
If you're looking for a slightly higher level API built on the same technology, you may want to check out capybara.
Capybara helps you test web applications by simulating how a real user would interact with your app. It is agnostic about the driver running your tests and comes with Rack::Test and Selenium support built in.
Casiano Rodriguez León 2015-01-07