Deploying to Heroku with Taglib-Ruby Gem (Rails 5)

292 views Asked by At

I have recently added the 'taglib-ruby' gem to my rails project, and am trying to push the project to Heroku. However, even when I bundle install, the push is continuously rejected with the following error:

You must have taglib installed in order to use taglib-ruby.
remote:        
remote:        Debian/Ubuntu: sudo apt-get install libtag1-dev
remote:        Fedora/RHEL: sudo yum install taglib-devel
remote:        Brew: brew install taglib
remote:        MacPorts: sudo port install taglib
remote:        
remote:        *** extconf.rb failed ***
remote:        Could not create Makefile due to some reason, probably lack of necessary
remote:        libraries and/or headers.  Check the mkmf.log file for more details.  You may
remote:        need configuration options.
  An error occurred while installing taglib-ruby (0.7.1), and Bundler cannot
remote:        continue.
remote:        Make sure that `gem install taglib-ruby -v '0.7.1'` succeeds before bundling.
remote:        
remote:        In Gemfile:
remote:        taglib-ruby

NOTE: I am aware that this question has been asked, but most answers offer the same buildpacks which extremely outdated and either deprecated, do not work or are poorly documented.

Does anybody know of any up-to-date buildpacks for this issue?

Alternatively, does anybody have any advice for putting together my own buildpack?

Some info about TagLib: It must be installed via homebrew (if that is what you are running) before you can install the gem. How are dependencies such as these handled when pushing to Heroku?

Thank you for your help!!

1

There are 1 answers

1
Zweih On

I have merged the most recent version of TagLib (1.11.1) and a patched branch from Aug 2018, from this pull request, of the buildpack and currently have it hosted here on GitHub.

For Heroku you need to ensure that the library buildpacks are loaded before the language buildpack that uses it is loaded.

For example, here is an image of my buildpack order

enter image description here

(found under your application tab).

EX:

1. https://github.com/Zweih/taglib-buildpack.git
2. heroku/ruby