rails_env bug fixed