Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails console no password supply error

I am running a rails application with postgresql as a database, I have a user on the database with empty password. The application runs successfully but when I am trying to use a model from the console I am getting the following error.

PG::ConnectionBad: fe_sendauth: no password supplied
like image 967
user3814030 Avatar asked Aug 24 '15 15:08

user3814030


1 Answers

Short answer, in your database.yml file, replace:

host: localhost with host: ''

This should do the trick.

For long answer and explanation, look at this answer

like image 163
K M Rakibul Islam Avatar answered Oct 23 '22 09:10

K M Rakibul Islam