Skip to content

Instantly share code, notes, and snippets.

@christianrojas
Last active August 29, 2015 14:03
Show Gist options
  • Save christianrojas/3f9a7e7503168a14dbf9 to your computer and use it in GitHub Desktop.
Save christianrojas/3f9a7e7503168a14dbf9 to your computer and use it in GitHub Desktop.
Fix PostgreSQL Mavericks
brew install postgresql
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/Homebrew/homebrew/issues/issue/2510
To migrate existing data from a previous major version (pre-9.3) of PostgreSQL, see:
http://www.postgresql.org/docs/9.3/static/upgrading.html
When installing the postgres gem, including ARCHFLAGS is recommended:
ARCHFLAGS="-arch x86_64" gem install pg
To install gems without sudo, see the Homebrew wiki.
To reload postgresql after an upgrade:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
env ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/usr/local/Cellar/postgresql/9.3.4/bin/pg_config
Postgres.app
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment