Welcome to the Ruby tutorial.

Computer programs consist of many machine instructions. Nobody has time to write machine instructions, so programming languages have been designed. One of these languages is Ruby.

Related course:
Learn Rails 5.2: Accelerated Web Development with Ruby on Rails

Quick Start

Create the hello world app

We create a program that outputs “Hello, World” to the screen.

Copy the code below and save the file as hello.rb

#!/usr/bin/ruby -w

puts "Hello, World!";

Then run the program with:

ruby hello.rb

If the program runs fine, you’ll see this output:


  1. Create a program that outputs your name
  2. Create a program that outputs your address (multiple lines).