Ruby on Rails/Getting Started/Common Errors
Sometimes things just go wrong. Here are some common errors and potential ways to fix them.
Missing Socket File
editIf 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.