Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of Rake?

Tags:

ruby

rake

I know Rake stands for Ruby Make, and I know Make is a unix build utility. Now, I come from working in Xcode building iPhone apps to Ruby, so I have never used Make before, and the only time I use rake is when in rails or installing some third party package and I type a command like rake db:migrate. The things I don't understand are ... What exactly is a build utility? What is the purpose of rake? What does it let me do? So if anyone can help answer any of these questions for me, it would be much appreciated.

like image 247
ab217 Avatar asked Sep 08 '10 15:09

ab217


People also ask

What is the purpose of raking soil?

Soil rakes are intended to level and grading the soil before the plants and seeds are been planted in the soil. Overtime soil loses it moisture in summer seasons which can harden the soil and create clumps of soil which can be easily broken with the help of the rake.

Why is rake important in farming?

Garden Rakes are used to break up and smooth soil after it has been spaded and cultivated. They have sharp, curved teeth of high-carbon steel to pulverize dirt clods, and straight backs to level the soil for planting.

What is the importance of rake tools?

The rake is often used to push or brush together cut grass, loose soil, gravel or debris. They are versatile tools, and in today's world the rake can be used for far more than a standard definition, but at the same time, not all rakes can be used for all jobs.

Can a rake be used as a weapon?

For example, rakes are used as a weapon in Takhado, a type of traditional martial arts.


1 Answers

Rake lets you script certain tasks on a per-project basis, much as a Makefile allows a Unix developer to script their compile and build process. The defined tasks you've used Rake with so far were included with the packages they came with (e.g. rake db:migrate comes with Rails, or at least with ActiveRecord) and automate certain tasks related to those packages (e.g. installing required gems for a Rails project).

If your project has certain tasks which are performed repeatedly, you can write a rake task to run those tasks which gets included in the SCM tree for the project and runs in the context of that project; in Rails they're in lib/tasks. You could write a Rake task to purge stale session records from your database, for example, and then set up a cron job to run it.

like image 107
pjmorse Avatar answered Dec 24 '22 05:12

pjmorse