Fill your DB with faker gem.
Code:
require 'mysql'
require 'faker'
db = Mysql::new("localhost", "root", "", "jazzezravi_development")
i=1
while i < 1000 do
c=Faker::Name.name
c.gsub("'","")
sql = "INSERT INTO batas VALUES(#{i},'#{c}','0','0');"
db.query(sql)
i+=1
end
Showing posts with label Ruby mysql faker. Show all posts
Showing posts with label Ruby mysql faker. Show all posts
Thursday, February 26, 2009
Subscribe to:
Comments (Atom)