rake task to populate a table

It seems that it's possible to create a rake task to populate db tables,
this is what I want to accomplish and rake seems like the best tool.
However, the only examples I found are rather complex.

How can I get started on this, please?

thanks,

Thufir

Mephisto’s bootstrap task is what I looked at initially and based my Kete app’s bootstrap task on:

http://development.kete.net.nz/kete/repository/file/trunk/lib/tasks/bootstrap.rake

That simply uses fixtures. If you want to get a little more hands on (and not delete existing data in the table), you can deal with your Rails models directly from rake. Examples can be found in here:

http://development.kete.net.nz/kete/repository/file/trunk/lib/tasks/upgrade.rake

Cheers,

Walter