0
我有一台虚拟机,我用它来测试数据库。用户名和密码是postgres,IP是192.168.1.255。 在我的Rails应用我有一个test.json
文件有以下几点:虚拟机上的PostgreSQL数据库不能正常工作
{
"db": "postgres://postgres:[email protected]:5432/geoforce_test?search_path=gfv2,public",
"log_level": 1,
"db_log": "log/v2-test.db.log"
}
然而,当我尝试运行测试(rspec spec
)我得到以下错误:
PG::ConnectionBad: could not connect to server: Permission denied (Sequel::DatabaseConnectionError)
Is the server running on host "192.168.1.255" and accepting
TCP/IP connections on port 5432?
想法?
我该如何检查该条目?我的pg_hba.conf有我的计算机IP作为可信 – WhomWhomWhom
检查文档在这里: – otaviofcs
http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html。类似于:host postgres all 192.168.12.10/32 md5 – otaviofcs