Search code examples
ruby-on-railsrubyherokugsltf-idf

Heroku/Rails: How to install the GNU Scientific Library (GSL) on Heroku?


I need to install the GSL library on Heroku running a Rails (4.0.2) app to use some gems that depend on it.

Goal: Install the GSL library to work with GSL and Similarity gems in Heroku.

Tried approaches:

I've tried following these steps (compiling binaries):

It works on my local environment but not in Heroku. Heroku doesn't allow sudo but it allows access with heroku run. The problem is that the file system is ephemeral and the dyno will only live as long as your console session.

Update:

I've also tried building my own Heroku Buildpack but I couldn't make it work. I tried using multipacks. I'm not a Heroku Buildpack expert so maybe it's the problem, I'm learning more about it to make a simple repository with an example and an extended explanation of this issue.


Solution

  • I made a heroku buildpack a couple months ago for 1.15 and 1.16

    just do:

    heroku buildpacks:set git://github.com/gregory/heroku-gsl-buildpack.git#gsl-1.16

    or

    heroku buildpacks:set git://github.com/gregory/heroku-gsl-buildpack.git#gsl-1.15