Skip to content

Instantly share code, notes, and snippets.

@cdnsteve
Last active August 29, 2015 14:17
Show Gist options
  • Save cdnsteve/507f86ee6918f8694190 to your computer and use it in GitHub Desktop.
Save cdnsteve/507f86ee6918f8694190 to your computer and use it in GitHub Desktop.
Ruby Python and Postgre install
From http://stackoverflow.com/questions/1383126/django-python-beginner-error-when-executing-python-manage-py-syncdb-psycopg2
Just had to unlink postgreSQL
`brew unlink postgresql`
then
`xcode-select --install`
and finally
`brew install postgresql`
`brew install openssl`
But then rails server didn't work so:
`rvm get stable`
To see which was my current_ruby
`rvm list`
`sudo rvm uninstall <current_ruby>`
`rvm install <current_ruby>`
Now create initialize a postgredb
`initdb /usr/local/var/postgres9.4.1`
And start your server
`pg_ctl -D /usr/local/var/postgres9.4.1 -l logfile start`
You're done.
To have launchd start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or, if you don't want/need launchctl, you can just run:
postgres -D /usr/local/var/postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment