RubyOnRails: "rake migrate" weirdness


When I do a “rake migrate” in my rails app’s directory, I get a rather weird authentication error:
=> rake aborted!
=> Access denied for user ‘tlpc’@‘’ to database ‘TLPC_production’

What’s weird?

  1. that isn’t a host
  2. if I change my database.yml so that the password is incorrect, I get a more sensible message: Access denied for user ‘tlpc’@‘’ (using password: YES)
  3. where’s the “using password”?
  4. I can login to the database no problem using those exact credentials from the same folder

It’s as if the authentication succeeds, then the request is somehow rerouted with a weird hostname, and THAT fails.

I did try adding that mask-like “hostname” to the allowable hosts for “tlpc” to no avail. And I’ve only seen this happen on my Dreamhost server. And it was happening before the Rails upgrade (only moments before, it turns out).

Weird. Look familiar to anyone?



Aha! Found it. Turns out my database name in “database.yml” was not exactly the same case as the actual database.

Wow, helpful error message!

And weird, my app still worked…