From the course: Learning Selenium

Install Ruby on Mac or Windows - Selenium Tutorial

From the course: Learning Selenium

Start my 1-month free trial

Install Ruby on Mac or Windows

- [Instructor] Ruby is required in this course in order to write and run the test examples. There are several methods to install Ruby, including package managers, which are the system-provided tools that manage software packages; installers, which install specific versions of Ruby; managers, which help switch between multiple Ruby installations, and from source code. Using third-party tools like managers or package managers might be a better idea that allow you to more easily get set up with Ruby. For OS X, Linux, and UNIX operating systems, I recommend using the manager RVM, which stands for the Ruby Version Manager. It is widely used, and allows you to quickly and easily install Ruby. I'll show how to setup and install the RVM and Ruby now. From the terminal, I can type \curl -sSL https://get.rvm.io | bash -s stable, which will install the latest stable version of RVM. It should take just a few minutes to install RVM and after doing that I can type RVM to see the list of options available to the Ruby Version Manager. And in order to install Ruby, I can type RVM install 2.5.1, which is the current, latest release for Ruby. And the installation will start to search for the binary Ruby's, this might take a few minutes. Once it completes, it can confirm that Ruby was successfully installed by typing ruby -v, which will return the currently installed version of Ruby on your computer. On Windows installing Ruby looks a little different. To install Ruby you can used what's called, the RubyInstaller. This is a self-contained Window's based installer that includes the Ruby language. I recommend to install Ruby with Devkit. This will provide the largest number of compatible gems and allows gems with the extensions to be compiled immediately. The latest version can be downloaded here at rubyinstaller.org/downloads. I'll choose to install Ruby plus Devkit 2.5.1-1. After downloading the executable, I will double click it to start the installation. When the setup window opens, I will choose to accept the license, then next, and leave all default components selected then click next again. And now I can wait a few minutes for the install to complete. On the final step, I can uncheck the check box that says "Run ridk install to setup MSYS2" as the setup wizard has just installed that component. Then I can click finish. Then I'll open my terminal, and once I'm there I can type ruby -v which will show now that I have the latest version of Ruby 2.5.1 installed on my Windows machine.

Contents