Writing Our First Program
Learn how to write a program using Ruby.
We'll cover the following
A terminal, also known as a console, shell, or command line, is a friend of any Ruby hacker. To run the programs that we’re going to build together, we need a central console, a place from where we can execute these programs: the terminal.
To be precise, this definition of a terminal isn’t one-hundred-percent correct, but it’s often used among programmers. They say “run in the terminal,” but we run all programs using a special software called a “shell.” In other words, we send our instructions to the shell, and the terminal is just a visual wrapper around this shell, where we can configure fonts, colors, copy/paste from our screen, and so on.
To learn about different kinds of terminals and how to set up Ruby on Windows or macOS, check out this lesson. We don’t need to install anything on our platform. All necessary installations are already in place. Here is the command that we will use to check the version of Ruby that was installed:
$ ruby -v
Try out this command in the terminal below.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy