Blog
WebsiteLoginFree Trial
  • 🏠PagerTree Blog
  • πŸ“£Meet the PagerTree CLI: Your New On-Call Sidekick!
  • πŸ“£OpsGenie Shutdown Announced: Why PagerTree Is Your Best Alternative in 2025
  • πŸ’ŽGetting Started With Ruby on Rails in 2024 - The Complete Development Environment Guide
  • πŸ“£WhatsApp Notifications
  • 🧠Site Reliability Engineer (SRE) Interview Questions
  • πŸ‘‘What is System Monitoring?
  • πŸ‘‘Top 5 Best PagerDuty Alternatives in 2024
  • πŸ”‘Understanding Linux File System: A Comprehensive Guide to Common Directories
  • πŸ”‘Ping Command: A Comprehensive Guide to Network Connectivity Tests
  • πŸ“œFly.io migrate-to-v2 Postgres stuck in read-only mode
  • πŸ’ŽMulti-Tenant SSO using Devise
  • ✨PromQL Cheat Sheet: A Quick Guide to Prometheus Query Language
  • πŸ”‘PowerShell Cheat Sheet: Essential Commands for Efficient Scripting
  • πŸ“£Critical Alerts for iOS and iPhone
  • πŸ“£PagerTree 4.0 is finally here!
  • πŸ’ŽRuby on Rails Polymorphic Select Dropdown
  • 🧠SRE Metrics: Availability
  • 🚨Incident Response Alert Routing
  • πŸ’ŽRuby on Rails Development Setup for Beginners
  • ✨Jekyll site to AWS S3 using GitHub Actions
  • πŸ’ŽMigrate attr_encrypted to Rails 7 Active Record encrypts
  • πŸ’ŽRuby on Rails Cheat Sheet
  • πŸ“£PagerTree Forms Integration
  • πŸ“£Public Team Calendars
  • πŸ“£Slack, Mattermost, Microsoft Teams, and Google Chat
  • πŸ“£On-call Schedule Rotations
  • πŸ“£Maintenance Windows
  • ✨Docker Commands Cheat Sheet
  • πŸͺ„Slack Channel Stakeholder Notifications
  • πŸ“£PagerTree Live Call Routing
  • 🧠The Science of On-Call
  • ✨serverless
    • 🧠What is Serverless?
    • 🧠Serverless Scales
    • 🧠Serverless Costs
    • ✨Serverless Tools and Best Practices
  • ✨Prometheus Monitoring Tutorial
Powered by GitBook
On this page
  • Introduction
  • Tools You Will Need
  • Step-By-Step Directions
  • Install git
  • Create SSH Key
  • Install HomeBrew
  • Installing Ruby Environment
  • Install Visual Studio Code
  • Install Postgres
  • Install Redis
  • Install NodeJS
  • Install Yarn
  • Conclusion

Was this helpful?

Ruby on Rails Development Setup for Beginners

In this blog post I will assist you in installing a Ruby on Rails development environment with a simple step-by-step process.

PreviousIncident Response Alert RoutingNextJekyll site to AWS S3 using GitHub Actions

Last updated 9 months ago

Was this helpful?

Today we will install Ruby on Rails (RoR) on a Debian Linux operating system ( LTS). With that said, RoR is compatible with other operating systems with just a few tweaks. This blog will assist you in installing RoR with a simple step-by-step process. Your installation may differ, for other operating systems refer to .

Introduction

I am new to developing and have been using LTS, a flavor of Debian Linux, for my projects. This blog will provide the steps and information needed to get the environment and dependencies installed for RoR so you can get your first project going.

Ruby on Rails is an excellent framework for web application development. For those of you who are new to RoR, like me, you will need to install several different applications (referred to as dependencies) to ensure this runs smoothly.

Tools You Will Need

Here are the packages, tools, and databases we will be installing:

  • - A distributed version control system.

  • Create a GitHub account - Our preferred vendor that allows us to host git repositories in the cloud.

  • - Secure Shell is a protocol that allows users to control and modify their remote servers over the Internet while ensuring security.

  • - Software package manager that simplifies the installation process for Mac OSX and Linux.

  • - A tool that manages, installs and runs multiple versions of Ruby.

  • - My preferred code editor.

  • - A used for long term storage.

  • - A used for short term storage (caching).

  • - Javascript runtime environment. Runs on the Chrome V8 engine and executes javascript code outside of a web browser.

  • - A more secure npm (node package manager - gets installed with NodeJS).

Step-By-Step Directions

Here we will be navigating through the steps to get your Ruby on Rails development environment setup and all of the dependencies installed.

Install git

You will need to run the commands below in your terminal to install git.

$ sudo add-apt-repository ppa:git-core/ppa -y
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git -y

Create SSH Key

$ ls -al ~/.ssh

If there are none, you will then run the next commands to generate a new one.

$ ssh-keygen -t ed25519 -C "[emailΒ protected]"

Next, press ENTER.

> Enter a file in which to save the key (/home/you/.ssh/id_ed25519): [Press enter]

Next you will be giving it your information.

> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again] 

Once you have the SSH key generated you will need to add it to the ssh-agent to manage. In the command line enter:

$ eval "$(ssh-agent -s)
> Agent pid 59566

To add it, ENTER.

$ ssh-add ~/.ssh/id_ed25519

Install HomeBrew

$ sudo apt install linuxbrew-wrapper

Installing Ruby Environment

Install rbenv

$ brew install rbenv ruby-build

Now rbenv should be installed, but we also need to add some startup scripts to your bash profile, so that your terminal uses rbenv instead of the system wide Ruby version.

$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile

Install Ruby 3.0.1

For our setup, let’s run the latest and greatest (as of this writing) version of Ruby (3.0.1). To install this version of Ruby, we will use rbenv. Run the following in your terminal:

$ rbenv install 3.0.1 -v
$ rbenv rehash
$ rbenv global 3.0.1 # set the global
$ ruby -v

Install Visual Studio Code

Install Postgres

$ brew install postgresql

Install Redis

$ brew install redis

Install NodeJS

Install Yarn

$ brew install yarn

Conclusion

Remember git is the program for distributed version control, and is our preferred vendor. So, if you haven’t already, create an account with GitHub.

You will need to and connect it to GitHub. We will first check to see if there are any existing SSH keys. Run this command to see if there are any pre-existing SSH keys.

The final step is to add it to GitHub. Follow to do so.

is a package manager (similar to apt-get) that helps us install other packages to our system. To get the Homebrew package installed, you will have to run the below command:

Remember, is a tool that will help us manage installing and running multiple version of Ruby. To install rbenv, run the following:

You can follow the directions in the link to get the correct version installed on your device.

will be our relational database preference for our RoR setup. To install:

is our key value database that RoR uses for caching.

The link will take you through the steps to get the correct version of installed to your device and will give a thorough understanding.

For the final step we will be installing the package manager ) by running the command below.

Now that your environment is ready, you can dive into your first project. All in all, Ruby on Rails is a great development environment. It is easy to navigate, scalable, and is excellent for team projects. Looking for more useful information for Ruby on Rails? Check out this .

πŸ’Ž
GitHub
create an SSH key
this guide
Homebrew
rbenv
Visual Studio Code
Postgres
Redis
NodeJS
Yarn
cheat sheet
Ubuntu 18.04
this site
Ubuntu 18.04
relational database
key-value database
git
SSH Key
HomeBrew
rbenv
Visual Studio Code
Postgres
Redis
NodeJS
yarn