0
votes

I am following the tutorial on Heroku on how to use heroku on iOS. The example uses a postgres database to store images and geolocation. I downloaded the postgres app on my Lion OSX and it says the postgres server running correctly. Now I am stuck on this step:

Update the config/database.yml file to reference the correct database user and password for >the development and test environments. Then create the local development database and run the >migrations.

$ bundle exec rake db:create db:migrate
==  CreatePhotos: migrating ===========
-- create_table(:photos)
...

But I receive the following error:

could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"? ....

What did I do wrong? I tried to manually create the postgres database using the createdb command but I go the same connectivity error.

1
What is the location you set in database.yml for the socket? eg socket: /tmp/postgres.sockChris McKnight
I was able to fix it, it seams that I had troubles with the installation of Postgres on MacOSX Lion. This issue is known and several solutions to the installation are online.alandalusi

1 Answers

0
votes

This error occurs when PostgreSQL is not listening on the socket specified. Causes can include (in order to check)

  1. PostgreSQL not properly installed

  2. PostgreSQL stopped or not running.

  3. PostgreSQL listening on a different socket or in a different directory. This information is specified in the postgresql.conf.