我正在關注如何在iOS上使用heroku的教程Heroku。該示例使用postgres數據庫來存儲圖像和地理位置。我在Lion OSX上下載了postgres應用程序,它說postgres服務器運行正常。現在我停留在這一步:使用Postgres的Heroku iOS教程
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)
...
但我收到以下錯誤:
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"? ....
我做了什麼錯?我嘗試使用createdb命令手動創建postgres數據庫,但我遇到了相同的連接錯誤。
什麼是您在database.yml中爲套接字設置的位置?例如:'socket:/tmp/postgres.sock' – 2012-07-19 03:48:14
我能夠修復它,它接合了我在MacOSX Lion上安裝Postgres時遇到的麻煩。這個問題是已知的,並且安裝的幾個解決方案在線。 – alandalusi 2012-07-19 07:36:51