If you are on Mac OSX,
The default location for the MySQL Unix socket is different on Mac OS X and Mac OS X Server depending on the installation type you chose
MySQL Unix Socket Locations on Mac OS X by Installation Type
So just change your database.yml in socket: /tmp/mysql.sock
to point to the right place depending on what OS and installation type you are using