Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


A make-like build utility for Ruby.

Subscribe to updates I use rake

Statistics on rake

Number of watchers on Github 1214
Number of open issues 35
Average time to close an issue 23 days
Main language Ruby
Average time to merge a PR 21 days
Open pull requests 24+
Closed pull requests 17+
Last commit over 1 year ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 3.46 MB
Homepage https://ruby.gith...
Organization / Authorruby
Page Updated
Do you use rake? Leave a review!
View open issues (35)
View rake activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating rake for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

= RAKE -- Ruby Make

home :: bugs :: docs :: build status :: {travis-ci}[] {appveyor}[]

== Description

Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.

Rake has the following features:

  • Rakefiles (rake's version of Makefiles) are completely defined in standard Ruby syntax. No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?)

  • Users can specify tasks with prerequisites.

  • Rake supports rule patterns to synthesize implicit tasks.

  • Flexible FileLists that act like arrays but know about manipulating file names and paths.

  • A library of prepackaged tasks to make building rakefiles easier. For example, tasks for building tarballs. (Formerly tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now available in RDoc, RubyGems, and rake-contrib respectively.)

  • Supports parallel execution of tasks.

== Installation

=== Gem Installation

Download and install rake with the following.

gem install rake

== Usage

=== Simple Example

First, you must write a Rakefile file which contains the build rules. Here's a simple example:

task default: %w[test]

task :test do ruby test/unittest.rb end

This Rakefile has two tasks:

  • A task named test, which -- upon invocation -- will run a unit test file in Ruby.
  • A task named default. This task does nothing by itself, but it has exactly one dependency, namely the test task. Invoking the default task will cause Rake to invoke the test task as well.

Running the rake command without any options will cause it to run the default task in the Rakefile:

% ls Rakefile test/ % rake (in /home/some_user/Projects/rake) ruby test/unittest.rb ....unit test output here...

Type rake --help for all available options.

== Resources

=== Rake Information

  • {Rake command-line}[rdoc-ref:doc/command_line_usage.rdoc]
  • {Writing Rakefiles}[rdoc-ref:doc/rakefile.rdoc]
  • The original {Rake announcement}[rdoc-ref:doc/rational.rdoc]
  • Rake {glossary}[rdoc-ref:doc/glossary.rdoc]

=== Presentations and Articles about Rake

  • Avdi Grimm's rake series:
    1. {Rake Basics}[]
    2. {Rake File Lists}[]
    3. {Rake Rules}[]
    4. {Rake Pathmap}[]
    5. {File Operations}[]
    6. {Clean and Clobber}[]
    7. {MultiTask}[]
  • {Jim Weirich's 2003 RubyConf presentation}[]
  • Martin Fowler's article on Rake:

== Other Make Re-envisionings ...

Rake is a late entry in the make replacement field. Here are links to other projects with similar (and not so similar) goals.

  • -- Bras, one of earliest implementations of make in a scripting language.
  • -- Make in Python
  • -- The Ant project
  • -- The Perl Build System
  • -- Rant, another Ruby make tool.

== Credits

[Jim Weirich] Who originally created Rake.

[Ryan Dlugosz] For the initial conversation that sparked Rake.

[Nobuyoshi Nakada] For the initial patch for rule support.

[Tilman Sauerbeck] For the recursive rule patch.

[Eric Hodel] For aid in maintaining rake.

[Hiroshi SHIBATA] Maintainer of Rake 10.X and Rake 11.X

== License

Rake is available under an MIT-style license.

:include: MIT-LICENSE

= Other stuff

Author:: Jim Weirich Requires:: Ruby 2.0.0 or later License:: Copyright Jim Weirich. Released under an MIT-style license. See the MIT-LICENSE file included in the distribution.

== Warranty

This software is provided as is and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.

== Historical

Rake was originally created by Jim Weirich, who unfortunately passed away in February 2014. This repository was originally hosted at {}[], however with his passing, has been moved to {ruby/rake}[].

You can view Jim's last commit here:

You can {read more about Jim}[] at Wikipedia.

Thank you for this great tool, Jim. We'll remember you.

rake open issues Ask a question     (View All Issues)
  • almost 3 years How to get exit status of the rake task using rake API
  • almost 3 years TestTask: running no tests should fail
  • over 3 years Idea: Preserve matchdata in rules
  • over 3 years Rake runs everything that is named like a file/folder
  • almost 4 years Rake -n does not mark dependents for Execution
  • almost 4 years Allow spaces between arguments in Rake task
  • almost 4 years Support named task arguments
  • about 4 years Rake not executing some tasks, gives "Invoke <task>s (first_time, not_needed)"
  • about 4 years Allow cleaning namespaces.
  • over 4 years Tasks that take arguments are only run for first set of arguments.
  • over 4 years Rules such as '.min.js' => '.js' don't work
  • over 4 years Can't pass parameters to rake task
  • over 4 years Stack Level Too Deep in 10.4.2
  • over 4 years [REGRESSION] FileList['[A-Z]*'] matches files starting with lower case character on default OS X file system using Ruby 2.2
  • over 4 years Marking tasks as :phony fails to prevent rebuild
  • over 4 years Make job submission system configurable
  • over 4 years Support for out-of-source builds
  • almost 5 years rake no longer deletes processed arguments from ARGV.
rake open pull requests (View All Pulls)
  • LinkedList Refactor
  • Allow spaces between arguments in Rake tasks
  • Convert manual page to use semantic -mdoc macros.
  • custom test loader: t.load = "file://path/to/loader"
  • Chained extensions
  • Make FileList#exclude more analogous to FileList#include
  • Offer alternatives if rake task not found
  • Correctly handle bad encoding in exception messages
  • Removed unused pathname extension
  • Don't set if args are blank
  • Sh fully echoes commands which error exit
  • Revert to glob support
  • remove obsolete OPT_TABLE entries
  • Actions adore keyword arguments
  • FileTask#out_of_date? calls depended FileTask#out_of_date? for execution
  • When pattern is nil, enhance_with_matching_rule will not fail
  • task_arguments.rb: delete unused *args
  • Phony tasks
  • Add a Rake.application.running? predicate
  • make clear that scope is ignored purposely in FileTask.scope_name
  • [Fixes #189] Don't run task if it depends on already invoked but failed task
  • [Fixes #246] Don't run file tasks needlessly
  • [Fixes #260] Make space trimming consistent for all task arguments
  • [Fixes #246] Don't run file tasks needlessly (2nd attempt)
rake questions on Stackoverflow (View All Questions)
  • Jenkins Rake couldn't find file
  • Rails app deployment, rake DB:migrate doesn't create table and want table to already be here to create them
  • Rake tasks for multiple databases with different schemas
  • Rspec Rake Task: How to parse a parameter?
  • Simple rake task to walk through directories and compile c files?
  • Rails not finding rake-10.5.0
  • rails error when trying to run rake db rake db structure dump
  • using Rake to build my software
  • Rails app, installing Devise, rake db:migrate error
  • Not deploying correctly with Rails and Capistrano, getting rake error?
  • "heroku run rake assets:clean" doesn't clean anything
  • How do I document Rake tasks with YARD?
  • Selenium-Webdriver in Ruby with minitest. Rake only runs one file with Dir.glob
  • How to check the progress of the rake db:seed
  • Rake task to update specific products in db
  • Rake exception management
  • Rails populate db rake task OpenURI::HTTPError: 500 Internal Server Error
  • Rails Rake: How to pass in arguments to a task with :environment
  • ruby 2.3 can't run "rake routes"
  • rake db:migrate fails in db:structure:dump with no error output
  • Possible issues with the rake rails:update:bin command
  • Rails 4.0 integration test fails at session setup only during rake test:all
  • Migration error: Heroku run rake db:migrate failed
  • Rake task replies with undefined method `created_at' – can't access columns
  • ActiveRecord::PendingMigrationError , Migration are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV = development on rails 4.2
  • rake db:seed NameError: uninitialized constant Exercice in rails console
  • Calling a ruby script which contains a system ('make') command from rake task
  • rake db:migrate refinerycms get error
  • Heroku run rake db:seed gives expecting keyword_end
  • Ruby on Rails: How do I run an automated rake task on Heroku
rake list of languages used
Other projects in Ruby