Last Updated: October 27, 2020
·
3.885K
· piermariacosina

Config Induction for Postgres.app

Download and Install Induction app ( actual Version 0.1.0 ) from http://inductionapp.com or https://github.com/Induction/Induction

Download and Install Postgres.app ( actual Version 1.0 ) from http://postgresapp.com or https://github.com/mattt/PostgresApp

Postgres is a little bit tricky with Induction, we can take in consideration 2 scenarios.

1 You have just installed Postgresapp and you want to check the connection with the dp.
Postgresapp when installed, it automatically create an empty db and a user using your MacOSX username (you can know it using in Terminal whoami) so
you can configure Induction using:
- your Mac OSX username as username and DBname
- password should be empty
- port 5432
Done

If the database is correct but completely empty on the top left corner of the app you will se the select with the db path but the screen will be the same of config, is kind of a bug.

2 You have created a postgres db for example using Rails rake db:create:all having a database.yml similar to this one

development:
adapter: postgresql
encoding: unicode
database: projectdevelopment
pool: 5
username: youruser
host: localhost
socket: /var/pgsql
socket

In this case your Induction config:

  • your Mac OSX username as username
  • DBname
  • password should be empty
  • port 5432

Done

NOTE: Production DB can be omitted if you will deploy to Heroku because they will override your config.

NOTE: host: localhost and socket: /var/pgsql_socket are useful if your console trowing rake db:create:all gives you errors about not connecting to the db

NOTE when you use rake db:create:al it creates the db but not the users you are using the user that Postgresapp has created for you.

Note: After you press connect Iinduction can freeze without responding in that case probably the path is wrong