Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save choyno/a699edc709d958ce8db532d77664417b to your computer and use it in GitHub Desktop.
Save choyno/a699edc709d958ce8db532d77664417b to your computer and use it in GitHub Desktop.
Rails: Reinstall postgreSQL via brew ang pg gem on Mac OS X
$ brew uninstall postgresql
$ gem uninstall pg # ALL OF THEM
$ rm -fr /usr/local/var/postgres
$ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
$ pg_ctl -D /usr/local/var/postgres stop -s -m fast # WE SHOULD HAVE ALL postgres SERVERS & PROCESSES STOPPED BY NOW
$ brew install postgres
$ env ARCHFLAGS="-arch x86_64" gem install pg
$ echo "DONE." >> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment