Transcripted Summary

# Install Ruby


An instillation of Capybara depends on two things: the Ruby programming language and Bundler, to manage the Ruby dependencies.

Let's check to see if you have Ruby on your local machine.

Open up your Mac terminal and type in:


ruby --version


We can see on this machine, yes, we do have Ruby.

If you don't have Ruby, the easiest way to install it is through Homebrew.

To check if you have Homebrew, type:


brew -v


Yes. We do have Homebrew on this machine.

If you do not have Homebrew, just go to Homebrew website.



Select the line of installation code, copy it, and paste this in the Mac 0S terminal prompt.

Okay, let's paste it.



Since we already have Homebrew, let's abort this.

Once you have Brew installed, just type in


brew install ruby

and Ruby will start installing after updating Homebrew.


# Install Bundler

Next, we need to install Bundler.

Bundler will manage all of our Ruby dependencies.



To install Bundler in the Mac terminal, just type in:


gem install bundler



The two commands we'll be using most of all is bundle install to update all of the Ruby dependencies of the project, and bundle execute in order to execute our tests.



Resources

Need to Learn Ruby?



:::tip Quiz The quiz for this chapter can be found in section 1.3 :::