fix rails env setting for lead gateway