[ACCEPTED]-What exactly is Rake?-rake
These answers assume you know what a DSL 15 is, or are familiar with Make or Ant. If 14 that's not the case, here's a (perhaps grossly 13 oversimplified answer):
Rake is a tool you can 12 use with Ruby projects. It allows you to use 11 ruby code to define "tasks" that 10 can be run in the command line.
Rake can 9 be downloaded and included in ruby projects as a ruby gem.
Once 8 installed, you define tasks in a file named 7 "Rakefile" that you add to your project.
We 6 call it a "build tool" because 5 Rake comes with some libraries that make 4 it easy to do tasks that are common during 3 the build/deploy process, like file operations (creating, deleting, renaming, & moving 2 files), publishing sites via FTP/SSH, and running tests.
For 1 more information, here's the project documentation: http://rake.rubyforge.org/
Try Martin Fowler's article on Rake for 13 more information:
http://martinfowler.com/articles/rake.html
His pre-amble is:
Rake is 12 a build language, similar in purpose to 11 make and ant. Like make and ant it's a 10 Domain Specific Language, unlike those 9 two it's an internal DSL programmed in 8 the Ruby language. In this article I introduce 7 rake and describe some interesting things 6 that came out of my use of rake to build this 5 web site: dependency models, synthesized 4 tasks, custom build routines and debugging 3 the build script.
There is more information 2 available on or linked from the project's 1 home page as well:
Rake is an implementation of dependency-based declarative programming in the Ruby Programming Language. Basically, Rake 3 is to Ruby what Make is to C, with the notable 2 difference, that Make is an external DSL, while 1 Rake is an internal DSL.
Rake lets you execute Ruby code through 3 a nice namespace api. An example is rake 2 db:migrate. You can run tasks automatically 1 before and after other tasks. That is all.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.