我已经克隆了Diaspora的源代码,并且我已经有了一个工作正常的本地pod,它似乎运行得很顺利。但是当我运行$ rake spec时,一些初始测试通过了,然后所有的测试都开始失败。此外,我发现有趣的是,每次运行rake spec时,它们都会在不同的时间点失败。
它们都会失败,并显示以下错误:
An error occurred in an after hook
ActiveRecord::StatementInvalid: PG::ConnectionBad: PQsocket() can't get socket descriptor: ROLLBACK
occurred at /home/darshan/.rvm/gems/ruby-2.0.0-p353@diaspora/gems/activerecord-3.2.16/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in `async_exec'Postgres的日志中写道:
could not receive data from client: Connection reset by peer
unexpected EOF on client connection发布于 2014-07-29 21:41:19
我遇到了同样的问题,并发现通过使用本地unix套接字文件,而不是通过本地主机访问Postgres服务器,问题似乎已经消失了。
为此,请从database.yml文件中删除host: localhost,然后重新运行rake spec。这将默认回到本地套接字文件(通常是/tmp中的.s.PGSQL.5432或/var/run/postgres,具体取决于您的平台)。
发布于 2015-03-27 07:02:52
我撞上了same problem。我试着恢复到pg版本的0.18.0而不是0.18.1,这似乎为我解决了这个问题。
发布于 2015-12-11 09:44:28
转到postgres.conf并将ssl = true更改为ssl = false
我找到了解决这个问题的方法here,它对我很有效。
https://stackoverflow.com/questions/21736107
复制相似问题