Skip to content

Instantly share code, notes, and snippets.

@hadibadjian
Last active October 29, 2017 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadibadjian/6214f06f7cf1b10e1903148a86d8dfa1 to your computer and use it in GitHub Desktop.
Save hadibadjian/6214f06f7cf1b10e1903148a86d8dfa1 to your computer and use it in GitHub Desktop.
MacOS PostgreSQL Setup

Install Postgres.app via Homebrew:

brew cask install postgres

Install pg gem manually via Postres.app configuration:

gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: myapp_development
test:
<<: *default
database: myapp_test
production:
<<: *default
database: myapp_production
username: myapp
password: <%= ENV['MYAPP_DATABASE_PASSWORD'] %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment