fix rails version detection