Best way to populate development database

What would be the best way to populate a development database for a
Rails 3 app? I have looked at faker, but it seems that development has
stopped, any other options?

Do you have your app deployed? What I do is populate development with
a recent backup of my live server every once in a while. That way I’m
seeing what the users are (at least until it drifts).

How do you do it? Regular sql dump tool (like mysqldump) and then some
rake
task for importing it on the development database?

obviously :smiley:
I was just thinking that could reuse configuration in your database.yml
(for
credentials, database location, etc)

My app is not live yet so I will need some sort of random data
generator for this.

no rake task needed. if you have the mysqldump, use the following
(assuming
the dump is dump.sql)

mysql -u root -p database < dump.sql

On Tue, Feb 8, 2011 at 2:03 PM, Nikos Dimitrakopoulos
[email protected]wrote:

What would be the best way to populate a development database for a
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

You can check the machinist gem
(GitHub - notahat/machinist at 1.0-maintenance) with Sham
(GitHub - panthomakos/sham: Lightweight flexible factories for Ruby on Rails testing.) and company. Be aware though that
it’s
pretty slow for big amounts of data (one database write per record)

How about faker and populator? See:

#126 Populating a Database - RailsCasts

Steve

Thanks everyone, I went with faker and this rake file:

On 7 February 2011 22:51, Hesham [email protected] wrote:

What would be the best way to populate a development database for a
Rails 3 app? I have looked at faker, but it seems that development has
stopped, any other options?

If you wish to do it via code you can put stuff in db/seeds.rb then run
it via
rake db:seed

Colin