Ruby on Mac OS X

Learn to set up the environment for Ruby in Mac OS X.

Overview

In this lesson, you'll learn to run Ruby code in Mac OS X.

Setup Mac OS X

No installation is required as a ready-to-use Ruby version comes with Mac OS X.

Create and save code file

Create a Ruby file ending with the .rb extension and save it to a dedicated folder on your system.

Tip: Creating a dedicated folder is recommended to be more organized.

Command line

  • The application to access the command line in Mac OS X is called Terminal. Open in Finder: Applications → Utilities → Terminal

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy