【发布时间】:2018-12-04 06:16:13
【问题描述】:
我在我的 Ruby on 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
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:
我刚刚在我的新 Mac mini 上安装了 Postgresql Server、PGAdmin、Stack Tools。在我的 MacBook 上,我有一个显示所有服务器的 postgresql 服务器图标。 (这在我的 Mac mini 上没有)
PGAdmin 正在运行。
localhost:3000/欢迎/索引
【问题讨论】:
-
你没有在
database.yml中提供任何密码它无法连接到你的PG数据库 -
我以前不需要密码。
标签: ruby-on-rails postgresql localhost pgadmin