Skip to content

Instantly share code, notes, and snippets.

@ddd1600
Last active December 22, 2015 21:19
Show Gist options
  • Select an option

  • Save ddd1600/6532403 to your computer and use it in GitHub Desktop.

Select an option

Save ddd1600/6532403 to your computer and use it in GitHub Desktop.
Postgres on Mac with Rails, working!
FOR MAC
- download and install Postgres.app, version 9.2.2.0 only!
(get here: http://postgres-app.s3.amazonaws.com/PostgresApp-9-2-2-0.zip <= link
from this: https://github.com/PostgresApp/PostgresApp/issues/109)
- add to ~/.bash_profile:
export PGHOST=localhost
- run:
gem uninstall pg (if already there)
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/MacOS/bin/pg_config
- run psql (should work now) and
CREATE DATABASE rails_db;
- database.yml
development:
adapter: postgresql
encoding: unicode
database: rails_db
pool: 5
host: localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment