5

I'm trying to install the gem 'taglib-ruby' on Heroku. This gem compiles as a native extension which requires a system dependency called taglib, so after compiling and uploading it through heroku vulcan, I achieved to compile the gem via command line on heroku bash:

bundle exec gem install taglib-ruby -- --with-opt-dir=/app/vendor/taglib

And in order to this parameter would be used by bundler later, I added it as a bundler configuration through the command:

bundle config build.taglib-ruby '--with-opt-dir=/app/vendor/taglib'

I've already verified this config was applied, inspecting the file /.bundle/config and looking for the line BUNDLE_BUILD__TAGLIB-RUBY.

However after pushing out my project to heroku and while it is executing the bundle install command, heroku complains that the above gem (taglib-ruby) cannot be installed due the taglib library isn't present, although it's what I was trying to solve with the option '--with-opt-dir=/app/vendor/taglib' mentioned above.

So it appears that Heroku is ignoring the bundler configuration.

What could be happening? Do you know another way the achieve the same intention (install a gem with custom build options) on Heroku?

Socrattes
  • 51
  • 2
  • Could you provide the contents of the mkmf.log file? – robinst Mar 24 '13 at 10:12
  • Heroku vulcan and vendoring binaries like so requires your own buildpack, right? Are you doing that? – catsby Mar 28 '13 at 16:19
  • Different gem, but same basic issue: I need to pass specific flags to bundler to get it to work on my local system, like so `bundle config build.RedCloth --with-cflags=-w`. Works great locally, but then when I push to Heroku, the bundle there fails because it doesn't have the build flags. Frustrating. Still looking for a solution. – Day Davis Waterbury Nov 05 '15 at 21:42

0 Answers0