RubyOnRails: "rake migrate" weirdness


#1

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’@‘205.196.208.0/255.255.240.0’ 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’@‘guilder.dreamhost.com’ (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?

rodney


#2

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…