I've got source of Diaspora cloned and I've got a working local pod that seems to run without a hitch. But when I run $ rake spec
some initial tests pass and then all of them start failing. Also, what I found interesting was that they fail at different points each time rake spec
is run.
They all fail with the error:
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' log said:
could not receive data from client: Connection reset by peer
unexpected EOF on client connection
I ran into the same problem and found that by using the local unix socket file, rather than accessing the Postgres server via localhost, the problem seems to have gone away.
To achieve this, remove the host: localhost
from your database.yml file, and re-run rake spec
. This defaults back to the local socket file (usually .s.PGSQL.5432 in /tmp or /var/run/postgres, depending on your platform.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With