Finally deployed my ruby on rails 3.2 app but when trying to open it from the browser I’m getting a 500 error (production.log gives)
Errno::ENOENT (No such file or directory - Problem opening database)
- installed rvm rails 3.2 ruby latest
- working cap deploy with nginx and unicorn
- rake db:migrate RAILS_ENV=production in production terminal => no errors
My production database.yml ( both tried with and without path to mysql socket, mysqld running fine mysql from terminal i can connect and see all tables in db )
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: paintings_production
pool: 5
username: paintings
password: mypass
socket: /var/lib/mysql/mysql.sock
Since you’ve confimed your socket file exists:
/var/lib/mysql/mysql.sock
…but the error message says no such file or directory, you have a permissions problem.
Or perhaps your mysql server isn’t configured to use the same socket correctly?
You can find a full mysql/rails unix socket debugging info here: Ruby on Rails 3 Can't connect to local MySQL server through socket '/tmp/mysql.sock' on OSX