0

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.

4

1 回答 1

0

当 PostgreSQL 未在指定的套接字上侦听时,会发生此错误。原因可能包括(为了检查)

  1. PostgreSQL 未正确安装

  2. PostgreSQL 停止或未运行。

  3. PostgreSQL 监听不同的套接字或不同的目录。此信息在 postgresql.conf 中指定。

于 2013-04-04T14:03:39.100 回答