Ruby On Rails MYSQL

software development


so I am trying to check out ruby on rails on my dreamhost account, and i cant seem to get my database configuration correct - i know the host, username and password are all correct because it works perfectly in PHP. does anyone know if there is something special that has to be done to make ruby on rails connect to mysql on dreamhost?

i also have a dedicated mysql server which when configured it works correctly, so clearly it is something related to connecting to only here at dreamhost. hoping someone has configured this and it works to help me figure out what might be the problem

support wont support 3rd party apps, so even though its a simple generic rails app (no coding by me) which wont connect to mysql when showing the app enviornment from the link on the basic ruby page.

any ideas?

thanks in advance for those that reply


Can you post the contents of your database.yml file?


nothing special - just standard config based on what i have read thus far

adapter: mysql
database: [my db name]
username: [mysql username]
password: [mysql pass]
host: [mysql host name set up in dreamhost panel]


If you’re sure all of your information is correct then there shouldn’t be any problems. There’s nothing special you need to do when using Ruby instead of another language like PHP. Did you setup your database correctly when you made the application? The default RoR application page will show even if you don’t setup your database connections, so if it’s not working then you might have another problem.

Are you getting any errors? You have a log directory in /home/username/logs/ and you’ll also have a log in your RoR application. Usually the latter has more useful information when diagnosing RoR problems.

You can paste the errors here if you like and maybe we can see what’s going on.

  • Greg
  • DreamHost Technical Support


greg from support, you might be the very same person from support which told me to post here and hopefully get an answer…but in any event here are the various errors:


[quote]/usr/bin/rake:17:Warning: require_gem is obsolete. Use gem instead.

[quote](in /home/.navajo/larrabee/testrails)

[quote]rake aborted!

[quote]Access denied for user ‘larrabeemysql’@‘’ (using

[quote]password: YES)



following in my logs
Mysql::Error (Access denied for user ‘larrabeemysql’@‘’ (using password: YES)):

the exact same username, password, and host name work perfectly in php.

I am not putting the part in, i am simply providing the portion in front of the “@” just like i do in php without any issue.