0

I'm attempting to resurrect some old code which used id3lib-ruby and id3lib to run on Heroku and am not having any luck with it - can someone tell me if its supported? I know that the id3lib-ruby gem itself is no longer supported, but just wondering if I can run it on Heroku?

Here is the error I'm getting:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

   /tmp/build_3287hfmgqe8t8/vendor/ruby-2.0.0/bin/ruby extconf.rb
   checking for main() in -lstdc++... yes
   checking for main() in -lz... yes
   checking for main() in -liconv... no
   checking for id3.h... no
   You must have id3lib installed in order to use id3lib-ruby.
   *** 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
   --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=/tmp/build_3287hfmgqe8t8/vendor/ruby-2.0.0/bin/ruby
   --with-stdc++lib
   --without-stdc++lib
   --with-zlib
   --without-zlib
   --with-iconvlib
   --without-iconvlib


   Gem files will remain installed in /tmp/build_3287hfmgqe8t8/vendor/bundle/ruby/2.0.0/gems/id3lib-ruby-0.6.0 for inspection.
   Results logged to /tmp/build_3287hfmgqe8t8/vendor/bundle/ruby/2.0.0/gems/id3lib-ruby-0.6.0/ext/id3lib_api/gem_make.out
   An error occurred while installing id3lib-ruby (0.6.0), and Bundler cannot
   continue.
   Make sure that `gem install id3lib-ruby -v '0.6.0'` succeeds before bundling.
   Failed to install gems via Bundler.
   Push rejected, failed to compile Ruby/Rails app

Does anyone have any ideas?

Thanks...Chris

thinkfuture
  • 241
  • 1
  • 5
  • 12

1 Answers1

1

4 months late but...

The error is because id3lib-ruby requires the id3lib header and library files to be available in order to be successfully installed (as the error says, it builds a native extension). Heroku doesn't have these available by default, so you have to install them with a buildpack (https://devcenter.heroku.com/articles/buildpacks).

I was just in the same boat so I wrote a Heroku buildpack to install id3lib which can be composed (using heroku-buildpack-multi) with their ruby buildpack to allow id3lib-ruby to be built: https://github.com/benalavi/buildpack-id3lib

Ben Alavi
  • 392
  • 3
  • 7