The seed-dump gem generates
for a Rails project from an existing database. It also works outside of Rails with
standalone-migrations, but you
need to jump through a couple of hoops to set up the Rake task and give it access
to your model classes.
In your Gemfile: