ruby-audio-heroku gem not working

Thursday, July 10, 2014

I am working on an heroku app (Ruby 1.9.3 and Rails 3.2.12). I want to use the ruby-audio gem. I first added the gem in my Gemfile and pushed to Heroku, but it needs libsndfile to work and I can't add it to heroku.


I tried the ruby-audio-heroku gem and I pushed to Heroku. Unfortunately, Heroku gives me the following error message :



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

/tmp/build_36c98c76-48a8-4a9a-893b-964c6d7fe4ec/vendor/ruby-2.0.0/bin/ruby extconf.rb
checking for sndfile.h in vendor/libsndfile/include,/opt/local/include,/usr/local/include,C:/Program Files (x86)/Mega-Nerd/libsndfile/include,C:/Program Files/Mega-Nerd/libsndfile/include... yes
checking for sf_open() in -lsndfile-1... no
checking for sf_open() in -lsndfile... no
*** 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=/tmp/build_36c98c76-48a8-4a9a-893b-964c6d7fe4ec/vendor/ruby-2.0.0/bin/ruby
--with-sndfile-dir
--without-sndfile-dir
--with-sndfile-include
--without-sndfile-include=${sndfile-dir}/include
--with-sndfile-lib
--without-sndfile-lib=${sndfile-dir}/
--with-sndfile-1lib
--without-sndfile-1lib
--with-sndfilelib
--without-sndfilelib
extconf.rb:21:in `<main>': Can't find libsndfile (http://ift.tt/1ieiGSF) (RuntimeError)

Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include
options to extconf. If there are spaces in the path on windows, it may not work.


Gem files will remain installed in /tmp/build_36c98c76-48a8-4a9a-893b-964c6d7fe4ec/vendor/bundle/ruby/2.0.0/gems/ruby-audio-heroku-1.6.2 for inspection.
Results logged to /tmp/build_36c98c76-48a8-4a9a-893b-964c6d7fe4ec/vendor/bundle/ruby/2.0.0/gems/ruby-audio-heroku-1.6.2/ext/rubyaudio_ext/gem_make.out
Installing rack-test 0.6.2
Installing pg 0.17.1
An error occurred while installing ruby-audio-heroku (1.6.2), and Bundler cannot
continue.
Make sure that `gem install ruby-audio-heroku -v '1.6.2'` succeeds before
bundling.
!
! Failed to install gems via Bundler.
!

! Push rejected, failed to compile Ruby app


I don't really know what to do. I thought that ruby-audio-heroku would fix the problem I had with libsndfile. Can someone help me understand ?







http://ift.tt/1rZ91Jj