I have not found a solution to the problem, however someone did already ask about the same problem a few days ago - (Rails Server Keeps Exiting (SocketError))
After
The problem solved by adding 127.0.0.1 localhost record to the private/etc/hosts file, which was removed by some reason before.
127.0.0.1 localhost
private/etc/hosts