[英]how to fix: PG::ConnectionBad: fe_sendauth: no password supplied
I'm inside my Ruby on Rails folder 我在Ruby on Rails文件夹中
$ rails server $ rails服务器
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 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. 我刚刚在新的Mac mini上安装了Postgresql Server,PGAdmin和Stack Tools。 On my MacBook I had a postgresql server icon that showed all the servers.
在我的MacBook上,我有一个显示所有服务器的postgresql服务器图标。 (this is missing on my Mac mini)
(我的Mac mini缺少此功能)
PGAdmin is running. PGAdmin正在运行。
localhost:3000/welcome/index 本地主机:3000 /首页/指数
as the example you post in your application.yml file, you aren't specifying a password: 作为您在application.yml文件中发布的示例,您未指定密码:
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 您需要为您的postgres用户设置一个密码,然后将该密码放在您的database.yml上以解决问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.