sometimes, ruby cannot resolve IP of `localhost`

it depends environment.