Skip to content

Instantly share code, notes, and snippets.

@VikParuchuri
Last active August 29, 2015 14:12
Show Gist options
  • Save VikParuchuri/64e3668f240d5fb0dd5b to your computer and use it in GitHub Desktop.
Save VikParuchuri/64e3668f240d5fb0dd5b to your computer and use it in GitHub Desktop.
* Install brew packages (brew-packages.txt)
* Setup all packages that need it so that they start at startup
* Install pip (easy_install pip)
* Install virtualenvwrapper (pip install virtualenvwrapper)
* export WORKON_HOME=~/Envs
* mkdir -p $WORKON_HOME
* source /usr/local/bin/virtualenvwrapper.sh
* mkvirtualenv turfly
* export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future";
psql -d postgres
* pip install -r requirements.txt
* psql -d postgres
* CREATE DATABASE turfly;
* exit psql shell
* psql -d turfly (puts you into the psql shell)
* CREATE EXTENSION postgis;
* CREATE EXTENSION postgis_topology;
* CREATE EXTENSION fuzzystrmatch;
* CREATE EXTENSION postgis_tiger_geocoder;
* Exit the psql shell
* In turfly_server directory, create private.py
* Add this to private.py, but swap your mac username for user:
* DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'turfly',
'USER': 'vik',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': ''
}
}
* Run python manage.py syncdb
* python manage.py migrate
* python manage.py runserver
@jinwkim
Copy link

jinwkim commented Jan 7, 2015

I am having an error in the same step:
Alejandros-MacBook-Pro:turfly_server admin$ psql -d postgres
-bash: psql: command not found

Thank you, Vik.

-Jin

@chitimalli
Copy link

I go the same error, but was able to fix after running the followimg commands:

/////
brew install pkg-config libffi
sudo bash
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/
pip install bcrypt
///////

//// Now run
pip install -r requirements.txt

///////
Seems like Vik added the following to the contained documentation to fix this error as well
///////

If you get error about 9.3 compatibility
http://stackoverflow.com/questions/24379373/how-to-upgrade-postgres-from-9-3-to-9-4-without-losing-data

brew install pkg-config libffi
sudo export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/
pip install bcrypt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment