The Ruby bindings for Selenium/WebDriver are available as the selenium-webdriver gem. To run Selenium tests with Ruby, we need to install Ruby parser (Ruby environment and executable file) and Selenium Web Driver.
Step 1. visit the Ruby site "https://www.ruby-lang.org/en/documentation/installation/" and choose one of the installation methods on the site depending on your OS and preferences.
Step 2: verify installation with the command below.
If Ruby was installed correctly, you will see the version information as shown below
ruby 2.1.3p242 (2014-09-19 revision 47630) [x64-mingw32]
In this example above, I installed Ruby 64 bit on Windows. During the installation you need to make sure Ruby installer updates some environment path to include Ruby and Gem executable file.
Installing Selenium WebDriver for Ruby
Assuming that you have already installed Ruby on your machine. Let's now install the Ruby WebDriver gem file.
Open command prompt on your operating system and execute the command below:
gem install selenium-webdriver
Ruby and Selenium web driver is now ready for developing test automation.