I have used Warble to make .war files. That worked pretty well.
Some of the tutorials online suggest using the "rake" command at various times. If rake is for compilation, I thought Ruby didn't need compilation. Is it a substitute for Warble? Or do these two play different functi开发者_开发知识库ons?
When is rake meant to be used?
Rake is a tool written in Ruby for automating tasks, which you also write using a Ruby syntax. Ruby program's don't have to be built, but there are still plenty of other tasks involved in development that you can automate instead of doing yourself each time.
Some examples from Rails include migrating your database to a new schema or creating a new database.
Rake lets you write tasks with a Ruby syntax, and you can also specify dependencies between tasks, so that running one task will cause all of its dependencies to be ran first.
Think of rake
as a make
for Ruby. For example for one of the gems I develop, the Rakefile
includes several tasks, like running all the tests (rake test
) or building the gem (rake gem:build
). More info on the web site:
http://rake.rubyforge.org/
精彩评论