Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

I am trying to configure postgreSQL as my local development database.

when I run

brew install postgres

I get the following error:

 postgresql-9.3.5 already installed

In my Gemfile I have the pg in the gem list.

When I run

rake db:create:all

I get the following error:

could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

My database.yml looks like the following:

development:
  adapter: postgresql
  encoding: unicode
  database: fls_development
  host: localhost
  pool: 5
  port: 5432

# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: postgresql
  database: fls_test
  pool: 5
  timeout: 5000

default: &default
  adapter: postgresql
  encoding: unicode
  pool: 5

also, similar to this post: How to configure PostgresSQL server on MacOS 10.8.5?, I get the following error when I just typ postgres

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.

I am confused because the solution to the aforementioned SO post recommends installing with Homebrew however I am pretty sure that is how I installed it.

share|improve this question

1 Answer 1

so, this is a sort of indirect solution, but I simply ran brew uninstall postgresql and then installed the PostgreSQL app which runs automatically on the right port 5432.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.