Last Updated: February 25, 2016
·
631
· jbowles

yosemite (OSX 10.10), postgresql, rubygem pg

Upgrade to Yosemite deletes specific postgres directories and, as far as I can tell, pg_config, so things like psql are not availble.

install or verify dev tools (this is setoff an install script if dev tools not there)

xcode-select --instal

# really verify dev tools is there

ls -la /Library/Developer/CommandLineTools/usr/bin

Re-create dirs deleted by Yosemite

mkdir /usr/local/var/postgres/pg_tblspc                                                           mkdir /usr/local/var/postgres/pg_twophase                                                         
mkdir /usr/local/var/postgres/pg_stat_tmp

unlink postgresql, update, doctor brew,

brew unlink postgresql
brew update
brew upgrade postgresql

From install directions to link the plist for postgres init on boot

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

bundle (un)install pg and openssl

rvm get stable
rvm list
rvm uninstall <YOUR RUBIES>
rvm install ruby #latest stable ruby version
gem install pg #verify this will work

Now you can bundle in a project.