From: Lloyd Linklater Date: 2007-12-07T21:28:46+09:00 Subject: Re: Random users generator Piotr Wlodarek wrote: > Recently I've seen a random user generator for Rails on some blog bu I > can't find it now. > > I need to generate 1 million non-existing emails with associated names > :-) > > Could you please recommend a tool? I would be surprised if there was one out there. Go to websites and get lists of names and make a file. You could use baby names list for the first names. read them into an array and do something like this: fnames = ["Adam", "Benjamin", "Caleb", "Daniel", "Frank", "Gideon"] lnames = ["Smith", "Jones", "Washington", "Jefferson", "Gardener", "Cooper"] 1_000_000.times do name = fnames[rand(6)] + lnames[rand(6)] + "@foobar.com" puts name #or whatever you want to do with the name. end -- Posted via http://www.ruby-forum.com/.