Just setup a new rails 3.1.3 app using mysql (mysql2 gem) on CentOS 5 server / apache / passenger… I have correctly setup a database and a user for that database and I have added the login and info into my database.yml file… I can generate stuff, and rake db:migrate ok but the “We’re sorry, but something went wrong.” message is being rendered in the browser and this message is showing up in my production.log file!
Started GET “/” for xx.xxx.xx.xxx at 2011-12-29 19:52:35 -0600
Mysql2::Error (Access denied for user ‘root’@’localhost’ (using password: NO)):
weird, I am not using “root” as the login info in database.yml… Any suggestions?
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: the_db_I_made
pool: 5
username: the_user_I_made
password: the_password
socket: /var/lib/mysql/mysql.sock
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: the_db_I_made
pool: 5
username: the_user_I_made
password: the_password
socket: /var/lib/mysql/mysql.sock
Ok, I guess this is all part of my learning curve 🙂
What it ended up being was this: The gem for passenger that I installed originally was version 3.0.9, I did a gem update –system and that installed version 3.0.11. So the server thought it was using version 3.0.11 and I was still pointing to libraries for 3.0.9 in my rails_server.conf file. I found how to upgrade on http://blog.phusion.nl/