Installing Ruby / GSL in a Heroku Application

Context:

  • I have an application that actively uses the GSL library and its Ruby bindings.
  • I would like to deploy the application to Heroku. I am very new to programming in general, much smaller, and Heroku is very easy to use, especially for Rails applications.
  • I have a GSL installed on my laptop. I am using gsl gem.

Problem:

  • Pearl requires that the GSL library is already installed.
  • GSL is not yet installed in the Heroku environment.
  • So, no wonder I get this error from Heroku after I git push heroku master

    -----> Heroku receiving push
    -----> Removing .DS_Store files
    -----> Ruby/Rails app detected
    -----> Installing dependencies using Bundler version 1.2.0.rc
           Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
    
    ...
    Installing gsl (1.14.7) with native extensions
    Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
    /usr/local/bin/ruby extconf.rb
    checking gsl version... *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers.  Check the mkmf.log file for more
    details.  You may need configuration options.
    Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/bin/ruby
    extconf.rb:237:in `rescue in <main>': Check GSL>=0.9.4 is installed, and the command "gsl-config" is in search path. (RuntimeError)
    from extconf.rb:138:in `<main>'
    

Solution (possibly):

  • Heroku builds seem to be a likely route. This (binary binary package dependency) seems promising.
  • I just don’t understand what is happening in the textbook, or how to use volcanoes.

:

  • , GSL Heroku.

!

0
1

( , ruby-gsl ?) ( , , , , ), , , :

heroku-buildpack-gsl-ruby

, , ;)

gsl 1.15, .

- : package_nodejs gsl (. readme). , , (/, , DRY).

+1

All Articles