Using RGeo with GEOS on Heroku with apt-get
Posted by Geremia Taglialatela on 01 August 2017
Here it is a new, super-easy approach to use Rgeo with GEOS on Heroku, by using the amazing
1. Add Aptfile
At the root of your repository, add a file called
Aptfile with the following content:
Make sure it ends with a newline.
2. Add the heroku-buildpack-apt buildpack
Method 1: Using app.json
You need to add the following entries:
Method 2: Using the console
Deploy to Heroku. Please note that if you have already installed rgeo, you need to recompile the gem.
Check the deploy log:
You can force recompiling by using the heroku repo plugin, running
heroku repo:purge_cache -a appname and deploying again.
You can check that everything is working by running
heroku run console:
An APT package may not be up to date with the latest version of the library it includes. In the before example, you will get GEOS 3.5.0, but (at the moment I’m writing) version 3.6.2 is out.
If you need newer versions of your libraries, you could use the following approach: Compile libraries on Heroku with Vesuvius.