Postgresql adapter (pg): could not connect to server
Try adding host: localhost
to your database.yml. (Based on: https://stackoverflow.com/a/10793186/919641)
Your Pg
gem was compiled against the PostgreSQL libpq pre-installed in Mac OS X and you're using the psql
that you installed in a newer version, or vice versa.
This can be worked around by specifying a TCP/IP connection, by adding localhost
to database.yml
, but it's better to compile the Pg
gem against the libpq
for the server you're actually running. To do that, you should be able to set the PATH
environment variable to the folder with the correct pg_config
in it before compiling. In your case that'll be somewhere within Postgres.app
.