Skip to content

Instantly share code, notes, and snippets.

@sonalranjit
Created September 1, 2017 00:02
Show Gist options
  • Save sonalranjit/75ac6dc6dd245fe4f4a43885fb55d7e1 to your computer and use it in GitHub Desktop.
Save sonalranjit/75ac6dc6dd245fe4f4a43885fb55d7e1 to your computer and use it in GitHub Desktop.
Accessing postgres from windows bash
Install Postgresql for Windows (the actual .exe not Linux Bash)
Create User & Password for Postgresql (I use postgres & password for my local development)
Install `postgresql-client-common`, `postgresql-client`, `and libpq-dev` (In Bash)
Run a sanity check in Bash to verify that things are working `psql -p 5432 -h localhost -U postgres`
If you get a psql prompt you're good to go, now you can do what you need to do (my particular situation was to get Rails running)
If you have errors well then you may just need to peck away at things and double check that your Postgres server is running in Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment