title: Repairing Postgresql after upgrading to OSX 10.7 Lion
body: <p>I recently upgraded to OSX 10.7, at which point my rails installation completely borked when trying to connect to the psql server.   When I do it from the command line using </p>
  
  <pre><code>psql -U postgres
  </code></pre>
  
  <p>it works totally fine, but when I try to run the rails server or console with the same username and password, I get this error </p>
  
  <pre><code>...activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:950:in `initialize': could not connect to server: Permission denied (PGError) 
  Is the server running locally and accepting
      connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
  </code></pre>
  
  <p>Any ideas what might be going on would be super helpful!  Thanks!</p>