How do I do error handling with something like this in RoR:
conn = Person.connection
conn.execute(sql_stmt)
What if there were errors while executing the SQL?
The execute method is just a wrapper for the connection's query method and that will raise an Mysql::Error exception if something is wrong. If you use mysql2 instead of the older mysql gem, then I think you'll get a Mysql2::Error exception.