Stephanie
Stephanie

Reputation: 105

how to fix: PG::ConnectionBad: fe_sendauth: no password supplied

I'm inside my Ruby on Rails folder

$ rails server

WARNING: Nokogiri was built against LibXML version 2.9.4, but has dynamically loaded 2.8.0
** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:migrate
rake aborted!
PG::ConnectionBad: fe_sendauth: no password supplied
/Users/snowflake/.rvm/gems/ruby-2.5.1@global/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/Users/snowflake/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:15:in `eval'
/Users/snowflake/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

datebase.yml

development:
 adapter: postgresql
 encoding: unicode
 database: pcms_development
 host: localhost
 pool: 5
 username: postgres
 password: 

test:
 adapter: postgresql
 encoding: unicode
 database: pcms_test
 host: localhost
 pool: 5
 username: postgres
 password: 

I just installed Postgresql Server, PGAdmin, Stack Tools onto my new Mac mini. On my MacBook I had a postgresql server icon that showed all the servers. (this is missing on my Mac mini)

PGAdmin is running.

localhost:3000/welcome/index

Upvotes: 2

Views: 4895

Answers (1)

xploshioOn
xploshioOn

Reputation: 4115

as the example you post in your application.yml file, you aren't specifying a password:

test:
 adapter: postgresql
 encoding: unicode
 database: pcms_test
 host: localhost
 pool: 5
 username: postgres
 password: 

you need to set a password to your postgres user and put that password on your database.yml to solve the problem

Upvotes: 2

Related Questions