Let’s Build: With Ruby on Rails – Installation

The installation of both Ruby and Rails can be quite the challenge. Luckily, this day and age there are some sweet tools to help us better manage our development environments as well as increase the productivity of our coding workflow. This video teaches you the steps to take in order to have a successful installation of both Ruby and Rails.

Ruby on Rails requires, you guessed it, Ruby and Rails to work. Both of these things can be installed using what are known as gems. The gem concept is likely familiar if you’ve ever used npm or yarn to install any type of package/plugin in your past.

Gems are built with ruby at their core so it makes sense that they are a large part of building a ruby on rails application.

Installation

The easiest way to install Ruby on Rails is by following a free guide over at installrails.com. This guide will go over everything you need to understand to install the framework successfully on your system of choice. Ruby comes preloaded on most Macintosh systems but you will likely want to make use of a more modern version of the language. Rather than type out each type of the process, I invite you to follow along with me in the video to better understand the things we are installing and see just how I install them on my machine.

After the install, I end up with the following versions. Your mileage may vary:


Rails 5.1.4
Ruby 2.4.2

Ruby Version Management

Ruby has a lot of releases in terms of new versions of the language. If you were to download all of them, your computer would be bloated with unneeded code. The fix this issue, we introduce a Ruby version management concept that allows you to pick and choose what versions of ruby you will utilize on your system. There are two big version managers. The most popular being RVM and the other is rbenv. Both accomplish the same tasks but I personally prefer rbenv. Many guides will tell you to use RVM and you absolutely can. In the end, it boils down to preference.

Homebrew

If you don’t already use Homebrew, you should stop what you are doing and start. Homebrew is described as:

The missing package manager for macOS

And it is just that. You can install quite a few dependencies not only for your rails projects but your entire computer with just a few keystrokes on the command line. I really love Homebrew and think you will too. If you are new to it head to the home page to download as we will be using it throughout this series and more on my blog.

Other Links and Resources

The Series So Far