Install Ruby Gems
Explore how to install essential Ruby gems such as mail, selenium-webdriver, and RSpec. Understand the process of downloading, updating, and listing gems from RubyGems.org to enhance your Ruby projects.
We'll cover the following...
Install the mail gem
Ruby gems are centrally hosted at rubygems.org. To install or update a Ruby gem, we need to be connected to the Internet.
gem install mail
The above command (run from a command-line window) will download and install the latest mail gem from this GitHub library. We can use the command below to list all the gems installed on our machine.
gem list
The site Ruby Toolbox categorizes popular Ruby gems, including ratings and other information. The good news is that most Ruby gems are free of charge.
Install Selenium WebDriver
gem install selenium-webdriver
Note: If you use Windows,
selenium-webdrivergem is already included in Ruby Shell.
Install the RSpec framework
We can do a standard gem installation to install RSpec in our system.
gem install rspec