January 2024
Intermediate to advanced
718 pages
20h 15m
English
If you’re using Ruby as a scripting language, you’ll be starting it from the command line. In this chapter, we’ll look at how to use Ruby as a command-line tool and how to interact with your operating system environment. The two most common ways for a Ruby program to kick off from the command line are with the Ruby interpreter itself and with Rake, a utility that makes it easy to define a series of interrelated tasks. You also might want to create your own command-line programs, and Ruby can help with that as well.
Please note that some of the details of this chapter only apply to Unix-based systems like Linux, MacOS, and WSL.
Read now
Unlock full access