21.2. Using Rake

The rake utility is like a Rubyesque version of the UNIX make utility. Instead of the bizarre “make” syntax that we know and hate, it uses only pure Ruby code. This utility is the work of Jim Weirich and illustrates (perhaps) the first formal instance of a DSL (domain-specific language) in Ruby.

You may see the name spelled “Rake” or “rake.” The former is the name of the tool, and the latter is the actual name of the executable itself. It’s not worth nitpicking, in my opinion.

The Rake tool is definitely inspired by make, so the terminology used is much the same. We still talk about targets, actions, dependencies, and rules.

The uses of Rake are numerous. If you are working with C, C++, or Java code, you can use it to build your ...

Get The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.