Netflix-Skunkworks / Scumblr

Web framework that allows performing periodic syncs of data sources and performing analysis on the identified results
Apache License 2.0
2.64k stars 318 forks source link

rake db:create issue #121

Closed smoebot closed 7 years ago

smoebot commented 7 years ago

Hello,

Clean install of Ubuntu 14.04, and installation instructions as per the wiki. I get to rake db:create

and get the following error fe_sendauth: no password supplied

followed by a whole bunch of output, then:

Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"scumblr_dev", "host"=>"localhost", "username"=>"scumblr", "password"=>nil, "port"=>5432, "pool"=>75, "socket"=>"/tmp/mysql.sock"}

my config/database.yml has the password within.

Any ideas?

ahoernecke commented 7 years ago

This would seem to indicate that it's not picking up your password... Can you post a screenshot of your database.yml file with the password redacted?

smoebot commented 7 years ago

screen Here's a screenshot of the config file

ahoernecke commented 7 years ago

I'm assuming you did remove the database password there?

smoebot commented 7 years ago

yes I did. I should have put (redacted) in there for clarity

ahoernecke commented 7 years ago

That all looks ok to me. Are you able to connect to postgres using psql or another client using the settings you have in your database.yml?

smoebot commented 7 years ago

I ran:

psql -h localhost -p 5432 -U scumblr

and get prompted for a password. After entering the password, I get:

psql: FATAL: database "scumblr" does not exist

ahoernecke commented 7 years ago

Could you try this command:

psql -h localhost -p 5432 -U scumblr -d postgres

Also check your database.yml file and make sure the spaces before each option (adapter, encoding, database, username, etc.) are all consistent spaces/tab and there isn't one that's different.

This seems very strange seems to be indicating a password isn't being sent, even though it sounds like you have one set.

smoebot commented 7 years ago

tried that, got in.

I checked the database file and there wasn't an issue with spaces, though I was able to introduce an issue by mucking about with spaces as you indicated.

I did change the password to one that didn't include special characters - both in the database.yml file and in postgres for the scumblr user.

After that, I got a different error: FATAL: password authentication failed for user "scumblr"

So, i changed the password to a simpler one in both the database.yml file, and in postgres, and then it all worked

ahoernecke commented 7 years ago

Oh, interesting... must have been a special character it didn't like. Glad you got it figured out!