Mysql2::Error (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)):
Now it didn't happen in development so I was perplexed until I realized that the rails upgrade plugin I used to help me along had replaced my database.yml file with a sane alternative. Since I was developing on a mac it had possibly prepopulated both the database name and a default mysql.sock. Correcting my database.yml file resolved the issue.
If you deploy to ubuntu, the correct socket entry for your database.yml file is probably:
It's amazing that no matter how far you get, you sometimes have to circle back and revisit the basics.