O'Reilly logo

Ruby by Example by Kevin C. Baird

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Interactive Ruby and the Ruby Environment

image with no caption

In Ruby, as in most programming languages, we’ll generally store programs in external files and execute them at once, as a unit. However, Ruby also gives you the option of typing the lines of a program one at a time and seeing the results as you go along, using Interactive Ruby (irb); irb is a shell, similar to bash in a Unix or Unix-like system or the command prompt in Windows. Using irb will give you a good idea of how Ruby processes information, and it should also help you gain an understanding of Ruby’s basics before you ever even write a program.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required