Harsha M V
Harsha M V

Reputation: 54949

Rails4 Generate Seed Data from Exisitng DB content

I have a DB content for location details like Countries, Regions, Cities with the data that amounts to over 50k Records. I wanna generate the Seed file with this data.

I am trying to use this plugin - seed_dump

But after running rake db:seed:dump nothing seems to happen.

Do i need to to create models before i do the dump?

Is there a way i can create Models based on the existing MySQL tables?

Upvotes: 0

Views: 124

Answers (1)

uselesssmile
uselesssmile

Reputation: 124

I use rails 4.1 with ruby 2.1.1 and this gem works perfectly with 5k records. Yep, you must create models, before use this gem. Or try dump database to yml-file.

Upvotes: 1

Related Questions