Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Rakefile?

Tags:

ruby

rakefile

I have started learning Ruby and just tried out my first hello world program in NetBeans IDE. I have one doubt, I can see that the new project wizard created set of package structure. It had one "Rakefile" in it. What does that mean and what is the use of it?

like image 922
bragboy Avatar asked May 21 '10 11:05

bragboy


People also ask

What is Rakefile in Ruby?

Rake is a tool you can use with Ruby projects. It allows you to use ruby code to define "tasks" that can be run in the command line. Rake can be downloaded and included in ruby projects as a ruby gem. Once installed, you define tasks in a file named "Rakefile" that you add to your project.

What is Rakefile in rails?

Rake is Ruby Make, a standalone Ruby utility that replaces the Unix utility 'make', and uses a 'Rakefile' and . rake files to build up a list of tasks. In Rails, Rake is used for common administration tasks, especially sophisticated ones that build off of each other.

How do you define a rake task?

Rake enables you to define a set of tasks and the dependencies between them in a file, and then have the right thing happen when you run any given task. The combination of convenience and flexibility that Rake provides has made it the standard method of job automation for Ruby projects.


1 Answers

It is an alternative to Makefile with Ruby syntax.

like image 196
Lucas Avatar answered Oct 05 '22 02:10

Lucas