ruby check role fix