In simple terms, what does Rake do? What purposes does it have? I understand it's a build tool but I'm looking a bit more detail. (For a simpleton.)
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Eager-loading association count with Arel (Rails 3
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
相关文章
- Ruby using wrong version of openssl
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
Rake is an implementation of dependency-based declarative programming in the Ruby Programming Language. Basically, Rake is to Ruby what Make is to C, with the notable difference, that Make is an external DSL, while Rake is an internal DSL.
Rake lets you execute Ruby code through a nice namespace api. An example is rake db:migrate. You can run tasks automatically before and after other tasks. That is all.
These answers assume you know what a DSL is, or are familiar with Make or Ant. If that's not the case, here's a (perhaps grossly oversimplified answer):
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.
We call it a "build tool" because Rake comes with some libraries that make it easy to do tasks that are common during the build/deploy process, like file operations (creating, deleting, renaming, & moving files), publishing sites via FTP/SSH, and running tests.
For more information, here's the project documentation: http://rake.rubyforge.org/
Try Martin Fowler's article on Rake for more information:
http://martinfowler.com/articles/rake.html
His pre-amble is:
There is more information available on or linked from the project's home page as well:
http://rake.rubyforge.org/