To bulk-load a database, I'd use the tools provided by the database. With
mysql, you'd do something like this (assuming that you're logged in to the
database server):

$ mysql -u [username] -p [database] < [file]

For example:

$ mysql -u craig -p hockey_development < players.sql

The -p flag will tell mysql to prompt me for a password, since I didn't
include one right after it so I don't have to enter it in plain text. It
doesn't show any progress. When it's done, you'll be back at the command
prompt.

If for some reason you really need to do this through Rails, I recommend
looking at ar-extensions [ http://continuousthinking.com/tags/arext ] for
much speedier loading.

Regards,
Craig

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to