Last Updated: February 25, 2016
· piermariacosina

Config for Terminal

Download and Install ( actual Version 1.0 ) from or

Running it there should be an elephant icon in the MacOSX top bar, clicking there it should tell you that postgress is running on port 5432

If when you are trying psql your Terminal return no command found
means that you haven't put this PATH="/Applications/$PATH" to the wrong place or that the path is incorrect or you haven't event put it anywhere.

If the path is incorrect check that your is in the Application folder, and not in a subfolder, in that case add it to the path e.g. "/Applications/Dev/

If you have put it in the wrong place or you haven't put it anywhere, try putting it in the .bashrc but better to the .bash_profile.

Use this
defaults write AppleShowAllFiles TRUE
killall Finder
to show hidden file, file starting with . are invisible system files

now navigate to your root user folder, I don't explain the terminal way because you will supposed to know vim or to open a file in your configured editor

So in finder navigate to youruser root or use keyboard shortcut MAIUSC+cmd+H
There you should find .bashrc and .bash_profile try putting the path in one of the two, reboot terminal and try psql again.

if it works try which psql that should print out the path to Application/ elsewhere you are pointing to an already existing Postgres installation in that case.

If you have Homebrew installed

brew remove postgresql 

if retrying everything just works you have done the first step, you can configure your Project like Rails to connect to the DB this is an example.

   adapter: postgresql
   encoding: unicode
   database: first_doers_app_development
   pool: 5
   username: eleonoragiammello
   host: localhost
   socket: /var/pgsql_socket

NOTE the last 2 lines prevent this king of error could not connect to server: No such file or directory it can happen because Rails don check localhost by default for postgres db, the second line specify the socket.