开发者

Rails - Rakefile

What is Rakefile? in the root /Rakefile

To get Jammit working,开发者_高级运维 You need to add the following to the Rakefile

require 'jammit'
Jammit.package!

Why is that? What does that do exactly? thxs


http://rake.rubyforge.org/files/doc/rakefile_rdoc.html

In Rails, the Rakefile allows you to run tasks using the application's environment. There are plenty of other non-rails things that rake is useful for. Its not something Rails specific and you can use any Ruby code in it. Rails and many gems use rake for things like migrations, cron jobs, and any other task that needs to run outside the application server.

From the Jammit documentation, it looks like this is not necessary to use it. They are just showing you an example of how to use it in a Rakefile if you want to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜