Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jurajmasar/6112218 to your computer and use it in GitHub Desktop.
Save jurajmasar/6112218 to your computer and use it in GitHub Desktop.
originalPath=`pwd`
sudo apt-get install -y postgresql-server-dev-9.1 libxml2-dev proj libjson0-dev xsltproc docbook-xsl docbook-mathml
cd /tmp
wget http://download.osgeo.org/geos/geos-3.3.5.tar.bz2
tar xvfj geos-3.3.5.tar.bz2
cd geos-3.3.5
./configure
make
sudo make install
cd ..
wget http://postgis.org/download/postgis-2.0.1.tar.gz
tar -xzf postgis-2.0.1.tar.gz
cd postgis-2.0.1
./configure --without-raster
make
sudo make install
sudo ldconfig
sudo make comments-install
cd ~
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/shp2pgsql
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql
sudo -u postgres psql -d template1 -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql
sudo -u postgres psql -d template1 -f /usr/share/postgresql/9.1/contrib/postgis-2.0/spatial_ref_sys.sql
sudo -u postgres psql -d template1 -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis_comments.sql
cd $originalPath
bundle update
bundle install --deployment --path vendor/bundle
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seed
bundle exec rake db:test:prepare
bundle exec rake spec
@cheshire137
Copy link

On Semaphore, I get a failure at this step:

sudo -u postgres psql -d template1 -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql

This is the failure:

/usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql: No such file or directory

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