Skip to content

Latest commit

 

History

History
 
 

hello-world

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Hello world

Jump start: Lesson 8

Learning Goal

  • Write and execute Ruby code
  • Practice using irb and running Ruby files from the terminal

Overview

A Hello World program is the first program that people often write when exploring with a new programming language. In this lesson you will write a hello world program in irb and using a Ruby file. irb is great for quick exploration, and using a Ruby file is great when you want to have a record of the code that was written so it can be executed again later.

Activities

  • Read about the history of Hello, World!
  • Write and execute a hello world program in the terminal using irb 1. Open terminal 2. Type irb and press [enter] 3. Type puts "Hello, World!" and press [enter]
  • Write a hello world program in a Ruby file and execute it form the terminal 1. Open terminal 2. Type touch hello-world.rb to create the file 3. Type atom . to open the file in Atom 4. Type puts "Hello, World" and save the file 5. In terminal type ruby hello-world.rb and press [enter]
  • Reflect on the steps you completed, and try them a few more times without referencing the instructions to practice