【发布时间】:2014-09-29 08:17:54
【问题描述】:
当我跑步时: 耙分贝:设置
我明白了:
fe_sendauth: no password supplied
Couldn't create database for {"adapter"=>"postfresql", "encoding"=>"unicode",
"host"=>"localhost", "pool"=>5, "username"=>"my_user", "password"=>nil,
"database"=>"my_db_test"}
-- enable_extension("plpgqsl")
rake aborted
Tasks: TOP => db:schema:load
我的数据库.yml:
connection: &connection
adapter: postgresql
encoding: unicode
host: localhost
pool: 5
username: my_user
password:
development:
<<: *connection
database: my_db_development
test: &test
<<: *connection
database: my_db_test
已经像这个问题一样更改我的 pg_hba.conf:Trying to set up postgres for ror app, getting error - fe_sendauth: no password supplied 但这一点帮助都没有。
【问题讨论】:
-
我将
postfresql视为适配器而不是postresql。这是一个错误吗?你能添加ActiveRecord::Base.connection.instance_variable_get(:@config)的输出吗? -
你能通过命令行或pgadmin连接到postgres吗?
-
尝试连接指定主机:
psql -U my_user -h localhost。如果它要求输入密码,那么您应该再次编辑您的pg_hba.conf。
标签: ruby-on-rails ruby postgresql ubuntu pg