From 941950a69dc2b0070df429ba3b59d318ed6ecea9 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 23 Jan 2014 16:25:48 -0800 Subject: [PATCH] Updated with tips for Postgres93.app It took me a while to figure this out, so hopefully it helps someone use discourse in the future. --- docs/DEVELOPMENT-OSX-NATIVE.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/DEVELOPMENT-OSX-NATIVE.md b/docs/DEVELOPMENT-OSX-NATIVE.md index 4e089252695..e090e719417 100644 --- a/docs/DEVELOPMENT-OSX-NATIVE.md +++ b/docs/DEVELOPMENT-OSX-NATIVE.md @@ -94,7 +94,29 @@ OS X ships with Postgres 9.1.5, but you're better off going with the latest from ### Using Postgres.app -[Instructions pending] +After installing the [Postgres93 App](http://postgresapp.com/), there is some additional setup that is necessary for discourse to create a database on your machine. + +Open this file: +``` +~/Library/Application Support/Postgres93/var/postgresql.conf +``` +And change these two lines so that postgres will create a socket in the folder discourse expects it to: +``` +unix_socket_directories = '/var/pgsql_socket'»# comma-separated list of directories +#and +unix_socket_permissions = 0777»·»·# begin with 0 to use octal notation +``` +Then create the '/var/pgsql/' folder and set up the appropriate permission in your bash (this requires admin access) +``` +sudo mkdir /var/pgsql_socket +sudo chmod 770 /var/pgsql_socket +sudo chown root:staff /var/pgsql_socket +``` +Now you can restart Postgres.app and it will use this socket. Make sure you not only restart the app but kill any processes that may be left behind. You can view these processes with this bash command: +``` +netstat -ln | grep PGSQL +``` +And you should be good to go! ### Using Homebrew: