title: postgres does not know where to find server configuration
body: <p>I' trying to run PostgreSQL for RoR on my new mac (i'm a newbie). I followed the installation guide however i can't get it to work properly. I've found similar questions but those didn't help. I get the following error on 'postgres' cmd.</p>
  
  <pre><code>postgres does not know where to find the server configuration file.
  You must specify the --config-file or -D invocation option or set the 
  PGDATA environment variable.
  </code></pre>
  
  <p>however when I set my -D invocation through</p>
  
  <pre><code>postgres -D /usr/local/var/postgres
  </code></pre>
  
  <p>I get another error</p>
  
  <pre><code>FATAL:  lock file "postmaster.pid" already exists
  HINT:  Is another postmaster (PID 6621) running in data directory    
  "/usr/local/var/postgres"?
  </code></pre>
  
  <p>I've tried to use 'kill 6621' but then it just seems to startup another postmaster on a different PID. I've also tried removing PID and running </p>
  
  <pre><code>postgres -D /usr/local/var/postgres
  </code></pre>
  
  <p>I get the following errors:</p>
  
  <pre><code>LOG:  could not bind IPv6 socket: Address already in use
  HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
  LOG:  could not bind IPv4 socket: Address already in use
  HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
  WARNING:  could not create listen socket for "localhost"
  FATAL:  could not create any TCP/IP sockets
  </code></pre>
  
  <p>Does anyone know what i'm doing wrong?</p>