fix rails env check