【发布时间】:2016-05-10 14:30:38
【问题描述】:
我有一个虚拟机,我用它来存放我的测试数据库。用户名和密码是 postgres,ip 是 192.168.1.255。
在我的 Rails 应用程序中,我有一个 test.json 文件,其中包含以下内容:
{
"db": "postgres://postgres:postgres@192.168.1.255: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?
想法?
【问题讨论】:
标签: ruby-on-rails postgresql rspec