Look at the MerbAdmin rake task as an example, however you may want to use thor instead of rake (I think the syntax is a bit nicer).
You may want to use this instead of my MLB gem: http://github.com/goncalossilva/dummy_data
Adding script to populate database. Closed by a616fe6
Added rake task to populate history table with data. Also added the dummy_data into the Gemfile of the dummy app.