My friends, I have a rake task that I'm running to initialize some stuff for new servers. I need to run a SQL file from inside that rake task. It's just a big, raw SQL file. How can I run the SQL file from inside the rake task? Thanks in advance for any good advice.
on 2008-10-16 22:57
on 2008-10-17 00:20
`mysql -uroot databasename < sqlfile.sql`
on 2008-10-17 03:12
ActiveRecord::Base.connection.execute( <file contents here> )