PostgreSQL
 sql >> Datenbank >  >> RDS >> PostgreSQL

Versuch, Postgres unter OSX einzurichten

Ich hatte ein ähnliches Problem auf meinem neuen MacBook Pro mit Mountain Lion. Ich habe die PostgresApp heruntergeladen und als ich Rails hochgefahren habe, habe ich die folgende Fehlermeldung erhalten:

`initialize': could not connect to server: No such file or directory (PG::Error)
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Um dies zu beheben, musste ich Host und Port explizit in meiner database.yml definieren Datei wie folgt:

development:
  adapter: postgresql
  encoding: unicode
  database: my_app_development
  pool: 5
  username: tony
  password: stark    
  host: localhost
  port: 5432