Executing sql script from Ruby

I have a use case in which, I want to execute a sql script on a mysql
server using ruby. I can not run the system command to invoke the mysql
client to execute the file. I tried preparing the statement ‘source
filename’ but it is not a sql and hence throws an error.

Could you tell me the best way to do this? Also, Ruby DBI does not allow
me to prepare statements with multiple sqls.