johnk
1
A couple questions concerning rakefiles?
- Where should I store Rakefile within my rails project? Within the
task folder? (if not then what is task folder meant for?)
- How do I extend the pre-existing rake tasks? For instance if I
want to create a “rake db:populate_db” task
- Is active record and the models within my rails project available
to the rake task by default? If not how do I include them?
Thanks for your help :-).
Thanks for your help.
Your Friend,
John
–
John K.
[email protected]
http://www.kopanas.com
http://www.soen.info
johnk
2
John K. wrote:
A couple questions concerning rakefiles?
- Where should I store Rakefile within my rails project? Within the
task folder? (if not then what is task folder meant for?)
- How do I extend the pre-existing rake tasks? For instance if I
want to create a “rake db:populate_db” task
- Is active record and the models within my rails project available
to the rake task by default? If not how do I include them?
Hi John,
-
Rails creates a rakefile for you in the root of your app. If you
just type ‘rake’ from your rails app directory it runs all tests by
default.
-
Create .rake files in that task folder to define new tasks ( see, for
example BigBold - Informasi Tentang Bisnis dan Marketing )
-
I would have thought not available by default, but the standard
require mechanism would work (I assume).
On a more general note, you can already populate your db (if you’re
using ActiveRecord migrations) using the standard task “db:migrate”.
Alan