small medium large xlarge

29 Sep 2017, 18:30
Jeremy (3 posts)

I’m at page 3 (pdf) trying to setup the PG database with a user and getting an error that I don’t know how to address:

[Jeremys-MacBook-Air]: ~/code/rails/shine$ createuser --createdb --login -P shine
Enter password for new role:
Enter it again:
createuser: could not connect to database postgres: 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"?
[Jeremys-MacBook-Air]: ~/code/rails/shine$

I’m new to development, so google searches have not been very helpful for me.

I uninstalled all versions of PostgreSQL on my machine via home-brew and reinstalled, so I assume that means a fresh file path and config files:

[Jeremys-MacBook-Air]: ~/code/rails/shine$ postgres --version
postgres (PostgreSQL) 9.6.5

And after reinstalling I deleted the first shine directory I made via $ rails new and made a fresh one.

I am running MacOS High Sierra with APFS, so I don’t know if that makes a difference or not - I did have to reinstall Xcode and Xcode Commandline Dev Tools to get git working again.

As I said, I’m new to this, so I’m kind of lost - spent a couple hours now wading through google results and can’t seem to find anything helpful. Thank you for any help you can offer.

29 Sep 2017, 18:48
Jeremy (3 posts)

Ugh - hello rubber-ducky…

I discovered the issue literally minutes after posting my question.

Somehow Postgres had stopped running, which I didn’t even know could happen.

$ brew services start postgres was all I needed.

You must be logged in to comment