Interactive Ruby Shell

Learn the Interactive Ruby Shell.

We'll cover the following

One other tool that’s worth mentioning and that comes with Ruby runtime is IRB. We can start it by typing irb in the shell and hitting “Enter.”

Its name is short for Interactive Ruby Shell, and yes, it’s another kind of shell. Just like the shell running in the terminal, irb is also a program that interactively waits for us to type something and hit “Enter.” However, because this is a Ruby shell, it expects that we type Ruby code instead of system commands.

Remember: IRB is pretty handy for quickly trying something out, and it’s a great tool for exploring the Ruby language and things that come built in.

For example:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy