2

I've just updated to Yosemite and my postgres version won't work, I'm receiving the following message from rails:

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"?

Even that I've started the server several times with

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

I'm trying to unlink postgreSQL from homebrew and reinstall, but I don't know if it will work.

Kampai
  • 22,848
  • 21
  • 95
  • 95
tomascharad
  • 3,156
  • 23
  • 24

1 Answers1

16

Just had to unlink postgreSQL

brew unlink postgresql

then

xcode-select --install

and finally

brew install postgresql

brew install openssl

But then rails server didn't work so:

rvm get stable

To see which was my current_ruby

rvm list

sudo rvm uninstall <current_ruby>

rvm install <current_ruby>

Now create initialize a postgredb

initdb /usr/local/var/postgres9.3.5

And start your server

pg_ctl -D /usr/local/var/postgres9.3.5 -l logfile start

You're done.

tomascharad
  • 3,156
  • 23
  • 24