AnApprentice
AnApprentice

Reputation: 111060

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

Upvotes: 5

Views: 3417

Answers (1)

johnmcaliley
johnmcaliley

Reputation: 11055

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.

Upvotes: 3

Related Questions