Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

rake

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 about 5 years ago
Repo Last Updated over 1 year ago
Size 3.46 MB
Homepage https://ruby.gith...
Organization / Authorruby
Contributors108
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 :: https://github.com/ruby/rake bugs :: https://github.com/ruby/rake/issues docs :: https://ruby.github.io/rake build status :: {travis-ci}[https://travis-ci.org/ruby/rake] {appveyor}[https://ci.appveyor.com/project/ruby/rake]

== 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}[http://devblog.avdi.org/2014/04/21/rake-part-1-basics/]
    2. {Rake File Lists}[http://devblog.avdi.org/2014/04/22/rake-part-2-file-lists/]
    3. {Rake Rules}[http://devblog.avdi.org/2014/04/23/rake-part-3-rules/]
    4. {Rake Pathmap}[http://devblog.avdi.org/2014/04/24/rake-part-4-pathmap/]
    5. {File Operations}[http://devblog.avdi.org/2014/04/25/rake-part-5-file-operations/]
    6. {Clean and Clobber}[http://devblog.avdi.org/2014/04/28/rake-part-6-clean-and-clobber/]
    7. {MultiTask}[http://devblog.avdi.org/2014/04/29/rake-part-7-multitask/]
  • {Jim Weirich's 2003 RubyConf presentation}[http://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/]
  • Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html

== 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.

  • http://directory.fsf.org/wiki/Bras -- Bras, one of earliest implementations of make in a scripting language.
  • http://www.a-a-p.org -- Make in Python
  • http://ant.apache.org -- The Ant project
  • http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
  • http://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.

== Credits

[Jim Weirich] Who originally created Rake.

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

[Nobuyoshi Nakada nobu@ruby-lang.org] For the initial patch for rule support.

[Tilman Sauerbeck tilman@code-monkey.de] 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 jim.weirich@gmail.com 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 {github.com/jimweirich/rake}[https://github.com/jimweirich/rake/], however with his passing, has been moved to {ruby/rake}[https://github.com/ruby/rake].

You can view Jim's last commit here: https://github.com/jimweirich/rake/tree/336559f28f55bce418e2ebcc0a57548dcbac4025

You can {read more about Jim}[https://en.wikipedia.org/wiki/Jim_Weirich] at Wikipedia.

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

rake open issues Ask a question     (View All Issues)
  • over 2 years How to get exit status of the rake task using rake API
  • over 2 years TestTask: running no tests should fail
  • about 3 years Idea: Preserve matchdata in rules
  • about 3 years Rake runs everything that is named like a file/folder
  • over 3 years Rake -n does not mark dependents for Execution
  • over 3 years Allow spaces between arguments in Rake task
  • over 3 years Support named task arguments
  • almost 4 years Rake not executing some tasks, gives "Invoke <task>s (first_time, not_needed)"
  • almost 4 years Allow cleaning namespaces.
  • about 4 years Tasks that take arguments are only run for first set of arguments.
  • about 4 years Rules such as '.min.js' => '.js' don't work
  • about 4 years Can't pass parameters to rake task
  • about 4 years Stack Level Too Deep in 10.4.2 Rake.application.run
  • 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
  • over 4 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