0

我正在尝试恢复一些使用 id3lib-ruby 和 id3lib 在 Heroku 上运行的旧代码,但我没有任何运气 - 有人可以告诉我它是否受支持吗?我知道 id3lib-ruby gem 本身不再受支持,但只是想知道我是否可以在 Heroku 上运行它?

这是我得到的错误:

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

有没有人有任何想法?

谢谢...克里斯

4

1 回答 1

1

晚了4个月,但是...

该错误是因为id3lib-ruby需要id3lib头文件和库文件才能成功安装(如错误所述,它构建了本机扩展)。Heroku 默认不提供这些,因此您必须使用 buildpack ( https://devcenter.heroku.com/articles/buildpacks ) 安装它们。

我只是在同一条船上,所以我编写了一个 Heroku buildpack 来安装id3lib,它可以heroku-buildpack-multi与他们的 ruby​​ buildpack 组合(使用)以允许id3lib-ruby构建:https ://github.com/benalavi/buildpack-id3lib

于 2013-11-08T19:54:38.860 回答