rails environment prob function fixed