Ruby is one of the most popular programming language used to develop a plethora of self-based projects. Through this article, I am going to give you a step by step guide on how to install Ruby on macOS. At the end of this, you have everything installed on your system to be able to start programming using Ruby.

One of the primary resources on how to get started with Ruby can be found on Ruby Site. If you go to Ruby’s official website, you can find all the latest information such as version, updates, and new platforms for Ruby. In addition to this, you can even see some installation instructions and download links.

Install Ruby on macOS

In this site, you can see the installation steps. They might change in the future due to the updates in the operating systems. So, whenever you face any difficulties, you must check their site which might help you to debug the problems quickly.

Also, Read | What is DNS, Steps For DNS Lookup?

Steps for How to install Ruby on macOS

First and foremost, you will need a Ruby interpreter and an editor to write and run Ruby programs on your Mac. But the happy news is that, if you are using macOS X or above then you have a version of Ruby pre-installed for you. But, it may or may not be the correct version to use and program so, you must update it.

Mac Installation: Ruby Interpreter

To install Ruby on macOS, follow the steps shown below. If you face any difficulties, do comment down below. We will be happy to help you.

Step 1: Go to the Ruby website and click the download button as shown below.

Ruby download
Click the Download Ruby Button

Step 2: When you go to this page, you will find that macOS needs a third party framework to install and run Ruby i.e. either rbenv and RVM. Now, below that, you can find an installation page. Click on that and you will be brought here.

installing Ruby
Click on the installation Link as shown in the figure.

Step 3: As you click on the link shown above, you will be directed to the installation guide where all the information is there for you. However, we are only interested in the instructions on how to install Ruby for macOS. Therefore, scroll down the page to find the Homebrew instruction as shown below.

Install Ruby on macOS
Click on the Homebrew to install Homebrew first

Step 4: Click on the Homebrew and you will be redirected to their page. Here, you will instantly find the terminal code as shown below. Paste this code in your terminal(cmd+space). This might ask you to enter your mac password. Type your password and let the program install.

Type this or paste this on your terminal
/usr/bin/ruby -e "$(curl -fsSL "

Tip: Don’t panic if you see that while entering the password, you can’t see that. Just type it as it does not appear there.

Step 5: Once you are done with this, you will notice that the command $ brew install ruby does not work. In order to work this, you need to run the following command on your terminal.

1.brew install rbenv --- then press enter
It will install the rbenv third party application. Then run, 
2.rbenv init --- press enter
The output will be "$(rbenv init -)"
Now,to install Ruby, run the following command.
3.rbenv install 2.6.4
This should install the latest version of Ruby on your mac

If you follow the steps mentioned above, then I hope you will not face any trouble installing Ruby on your macOS.

Which Text Editor Should I use for Ruby?

Well, the answer to this question is pretty straight forward i.e. any text editor is good enough and will serve your purpose. But, in my opinion, you should go for Sublime or VS Code as they are the latest and widely used in the industries. Things that you must keep in mind before choosing the text editor are as follows.

  • Open Source and free to use
  • Use text coloring
  • Have support for integrating external framework and third party API’s
  • Can be customized easily
  • Have a few pre-installed packages for you to get started

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.