Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created October 9, 2011 04:11
Show Gist options
  • Save springmeyer/1273278 to your computer and use it in GitHub Desktop.
Save springmeyer/1273278 to your computer and use it in GitHub Desktop.
compile ruby-mapnik against mapnik trunk on ubuntu 11.04
## install mapnik 2.x (trunk) from nightlies
# be careful with this because these change nightly
# and may require you re-compile apps using mapnik
# after you run `apt-get upgrade` post installation of mapnik
apt-get install python-software-properties
apt-add-repository ppa:mapnik/nightly-trunk
sudo apt-get update
sudo apt-get install libmapnik2 libmapnik2-dev mapnik2-utils python-mapnik2
## install ruby
sudo apt-get install curl
# install rvm
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# put this in ~/.profile
[[ -s "/home/mapnik/.rvm/scripts/rvm" ]] && source "/home/mapnik/.rvm/scripts/rvm"
# install ruby
rvm install ruby-1.9.2-p290
# put on path
export PATH=/home/mapnik/.rvm/bin/:$PATH
# install ruby-mapnik (and deps)
# this fails due to https://github.com/mapnik/Ruby-Mapnik/issues/7
#gem-ruby-1.9.2-p290 install ruby_mapnik
# so go more manual route.
# install deps:
gem-ruby-1.9.2-p290 install hoe rake-compiler ZenTest
# compile Ruby-Mapnik from github:
git clone git://github.com/mapnik/Ruby-Mapnik.git
cd Ruby-Mapnik
rake-ruby-1.9.2-p290 compile # get coffee or beer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment