Ensure requiring active_record, fix #1247