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? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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). On Mon, Feb 7, 2011 at 5:51 PM, Hesham <hesham.amiri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
How do you do it? Regular sql dump tool (like mysqldump) and then some rake task for importing it on the development database? On Tuesday, February 8, 2011 1:42:22 AM UTC+2, paul wrote:> > 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). > > On Mon, Feb 7, 2011 at 5:51 PM, Hesham <hesham...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 <demisone-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> How do you do it? Regular sql dump tool (like mysqldump) and then some rake > task for importing it on the development database? > > On Tuesday, February 8, 2011 1:42:22 AM UTC+2, paul wrote: > >> 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). >> >> On Mon, Feb 7, 2011 at 5:51 PM, Hesham <hesham...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? >> > >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
obviously :D I was just thinking that could reuse configuration in your database.yml (for credentials, database location, etc) On Tuesday, February 8, 2011 8:51:32 AM UTC+2, jim wrote:> > 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 <demi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> How do you do it? Regular sql dump tool (like mysqldump) and then some >> rake task for importing it on the development database? >> >> On Tuesday, February 8, 2011 1:42:22 AM UTC+2, paul wrote: >> >>> 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). >>> >>> On Mon, Feb 7, 2011 at 5:51 PM, Hesham <hesh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? >>> > >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonra...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > > > -- > ------------------------------------------------------------- > visit my blog at http://jimlabs.heroku.com >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
My app is not live yet so I will need some sort of random data generator for this. On Feb 8, 11:32 am, Nikos Dimitrakopoulos <demis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> obviously :D > I was just thinking that could reuse configuration in your database.yml (for > credentials, database location, etc) > > > > > > > > On Tuesday, February 8, 2011 8:51:32 AM UTC+2, jim wrote: > > > 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 <demi...-Re5JQEeQqe8@public.gmane.orgm>wrote: > > >> How do you do it? Regular sql dump tool (like mysqldump) and then some > >> rake task for importing it on the development database? > > >> On Tuesday, February 8, 2011 1:42:22 AM UTC+2, paul wrote: > > >>> 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). > > >>> On Mon, Feb 7, 2011 at 5:51 PM, Hesham <hesh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Ruby on Rails: Talk" group. > >> To post to this group, send email to rubyonra...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> To unsubscribe from this group, send email to > >> rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> For more options, visit this group at > >>http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > ------------------------------------------------------------- > > visit my blog athttp://jimlabs.heroku.com-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You can check the machinist gem (https://github.com/notahat/machinist/tree/1.0-maintenance) with Sham (https://github.com/panthomakos/sham) and company. Be aware though that it''s pretty slow for big amounts of data (one database write per record) On Tuesday, February 8, 2011 10:13:03 AM UTC+2, Hesham wrote:> > My app is not live yet so I will need some sort of random data > generator for this. > > On Feb 8, 11:32 am, Nikos Dimitrakopoulos <demi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > obviously :D > > I was just thinking that could reuse configuration in your database.yml > (for > > credentials, database location, etc) > > > > > > > > > > > > > > > > On Tuesday, February 8, 2011 8:51:32 AM UTC+2, jim wrote: > > > > > 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 < > dem...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > > > >> How do you do it? Regular sql dump tool (like mysqldump) and then some > > > >> rake task for importing it on the development database? > > > > >> On Tuesday, February 8, 2011 1:42:22 AM UTC+2, paul wrote: > > > > >>> 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). > > > > >>> On Mon, Feb 7, 2011 at 5:51 PM, Hesham <hes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? > > > > >> -- > > >> You received this message because you are subscribed to the Google > Groups > > >> "Ruby on Rails: Talk" group. > > >> To post to this group, send email to rubyo...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > >> To unsubscribe from this group, send email to > > >> rubyonra...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > >> For more options, visit this group at > > >>http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > -- > > > ------------------------------------------------------------- > > > visit my blog athttp://jimlabs.heroku.com-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 February 2011 22:51, Hesham <hesham.amiri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
How about faker and populator? See: http://railscasts.com/episodes/126-populating-a-database Steve On Feb 7, 5:51 pm, Hesham <hesham.am...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks everyone, I went with faker and this rake file: https://gist.github.com/300536 On Feb 8, 4:58 pm, steveb <sbobrows...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How about faker and populator? See: > > http://railscasts.com/episodes/126-populating-a-database > > Steve > > On Feb 7, 5:51 pm, Hesham <hesham.am...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.