def get_ruleset_by_ord(rulesengine_db, ordinal):
    """gets ruleset by ordinal"""
    from src.praxxis.sqlite import connection
    from src.praxxis.util import error
    conn = connection.create_connection(rulesengine_db)
    cur = conn.cursor()
    get_ruleset_by_ord = (
        'SELECT Name FROM "RulesEngine" ORDER BY Active DESC, ID LIMIT ?,?')
    cur.execute(get_ruleset_by_ord, (ordinal - 1, ordinal))
    conn.commit()
    rows = cur.fetchall()
    conn.close()
    if rows == []:
        raise error.RulesetNotFoundError(ordinal)
    return rows[0][0]
