This chapter is from the book

You should have spent a good amount of time in Exercise 0 learning how to install a text editor, run the text editor, run Terminal, and work with both of them. If you haven’t done that, then do not go on. You will not have a good time. This is the only time I’ll start an exercise with a warning that you should not skip or get ahead of yourself.

Type the following text into a single file named ex1.rb. Ruby works best with files ending in .rb.

Don’t worry if your editor doesn’t look exactly the same, it should be close though. When you create this file, keep in mind these points:

I did not type the line numbers on the left. Those are printed in the book so I can talk about specific lines by saying, ”See line 5.” You do not type line numbers into Ruby scripts.

I have the puts at the beginning of the line and it looks exactly the same as what I have in ex1.rb. Exactly means exactly, not kind of sort of the same. Every single character has to match for it to work. Color doesn’t matter, only the characters you type.

In Terminal run the file by typing:

ruby ex1.rb

If you did it right, then you should see the same output as in the What You Should See section of this exercise. If not, you have done something wrong. No, the computer is not wrong.