411 REFERENCE · Wikibooks
Ruby on Rails/Getting Started/Common Errors
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Sometimes things just go wrong. Here are some common errors and potential ways to fix them.
Missing Socket File
If you see the following error:
No such file or directory - /tmp/mysql.sock
It means that Rails is looking for the default /tmp/mysql.sock which may not exist. There are several options to fix this:
Find the correct location of the mysql.sock file and add a socket: option to the database.yml
Find the correct location of the mysql.sock file and add a symlink from /tmp/mysql.sock
If you cannot find the mysql.sock file then perhaps MySQL is not running or is installed incorrectly.