Based on https://github.com/aaronrenner/heroku-buildpack-rgeo-prep but with support for existing applications.
General steps:
- Add the
buildpacks
and.vendor_urls
- Add the custom buildpack files under a new directory
bin
- Run:
heroku config:set LD_LIBRARY_PATH=/app/lib
- Deploy
You should see something like:
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/peterkeen/heroku-buildpack-vendorbinaries.git
=====> Detected Framework: VendorBinaries
-----> Found a .vendor_urls file
Vendoring https://s3.amazonaws.com/spacialdb/heroku/geos-3.3.8.tar.gz
Vendoring https://s3.amazonaws.com/spacialdb/heroku/proj-4.8.0.tar.gz
=====> Downloading Buildpack: https://github.com/aaronrenner/heroku-buildpack-rgeo-prep.git
=====> Detected Framework: heroku-buildpack-rgeo-prep
-----> Removing cached .bundle/config
Writing new .bundle/config
=====> Downloading Buildpack: https://github.com/kr/heroku-buildpack-inline.git
=====> Detected Framework: RGeoCleaner
-----> Removing all rgeo files to force compilation during bundling
-----> cleaning cache dir
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/cache/rgeo-activerecord-0.4.6.gem
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/cache/rgeo-0.3.20.gem
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/cache/rgeo-shapefile-0.2.3.gem
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/cache/rgeo-geojson-0.2.3.gem
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/specifications/rgeo-activerecord-0.4.6.gemspec
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/specifications/rgeo-shapefile-0.2.3.gemspec
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/specifications/rgeo-geojson-0.2.3.gemspec
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/specifications/rgeo-0.3.20.gemspec
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-shapefile-0.2.3
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-shapefile-0.2.3/lib/rgeo
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-shapefile-0.2.3/lib/rgeo-shapefile.rb
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-activerecord-0.4.6
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-activerecord-0.4.6/lib/rgeo
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-activerecord-0.4.6/lib/rgeo-activerecord.rb
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-geojson-0.2.3
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-geojson-0.2.3/lib/rgeo-geojson.rb
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-geojson-0.2.3/lib/rgeo
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-0.3.20
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-0.3.20/lib/rgeo
/app/tmp/repo.git/.cache/vendor/bundle/ruby/1.9.1/gems/rgeo-0.3.20/lib/rgeo.rb
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby/Rails
To test:
$ heroku run rails c
Running `rails c` attached to terminal... up, run.4936
Loading production environment (Rails 3.2.11)
irb(main):001:0> RGeo::Geos.supported?
=> true
irb(main):002:0> RGeo::CoordSys::Proj4.supported?
=> true