“Rake spec” failing most tests, but “rails s” working fine on Diaspora source

眉间皱痕 提交于 2019-12-05 08:21:53

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.)

Brandon J McKay

I ran into the same problem. I tried reverting to pg version 0.18.0 instead of 0.18.1, and that seems to fix it for me.

Go to postgres.conf and change ssl = true to ssl = false

I found the fix for this issue here and it worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!