fix rails script