taglib-ruby gem を利用する Rails 3.2 を使用してアプリケーションを構築しました。
このアプリを Heroku にアップロードする必要がありますが、関連する C++ taglib ライブラリをマシンにインストールする必要があるため、taglib-ruby gem を正常にビルドできません。
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for main() in -lstdc++... yes
checking for main() in -ltag... no
You must have taglib installed in order to use taglib-ruby.
Debian/Ubuntu: sudo apt-get install libtag1-dev
Fedora/RHEL: sudo yum install taglib-devel
Brew: brew install taglib
MacPorts: sudo port install taglib
*** 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=/usr/local/bin/ruby
--with-tag-dir
--without-tag-dir
--with-tag-include
--without-tag-include=${tag-dir}/include
--with-tag-lib
--without-tag-lib=${tag-dir}/lib
--with-stdc++lib
--without-stdc++lib
--with-taglib
--without-taglib
Gem files will remain installed in /tmp/build_1upomfnxnemtx/vendor/bundle/ruby/1.9.1/gems/taglib-ruby-0.5.2 for inspection.
Results logged to /tmp/build_1upomfnxnemtx/vendor/bundle/ruby/1.9.1/gems/taglib-ruby-0.5.2/ext/taglib_base/gem_make.out
An error occurred while installing taglib-ruby (0.5.2), and Bundler cannot
continue.
Make sure that `gem install taglib-ruby -v '0.5.2'` succeeds before bundling.
これにより、Vulcan を使用してカスタム ビルドパックを作成し、アプリをインストールすることにしました。
https://github.com/heroku/vulcan/issues/32のアドバイスに従って、Vulcan を使用して cmake と taglib を正常にインストールできました。https://github.com/JllyGrnGiant/vulcan-buildpackでホストしているコンピューターに vulcan がダウンロードした結果のファイル
アプリのディレクトリに移動して実行すると
heroku create --stack cedar --buildpack [github repo].git
次に、アプリをプッシュしようとすると、ビルダーはビルドパックを正常に見つけますが、アプリのインストールを続行する方法がわかりません
Counting objects: 893, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (828/828), done.
Writing objects: 100% (893/893), 38.75 MiB | 1.03 MiB/s, done.
Total 893 (delta 480), reused 57 (delta 2)
-----> Fetching custom git buildpack... done
! Heroku push rejected, no Cedar-supported app detected**
これは、デフォルトの Ruby ビルドパックをフォークする必要があるためだと思います。
今、私たちは私の問題に到達しました。私はデプロイメントに関してあまり詳しくないので、taglib ファイルをどこに含めるべきか、また変更すべき他のファイルがわからないので、アプリをプッシュすると、これらの taglib ライブラリが見つかり、taglib-ruby gem がビルドされます。Heroku の Web サイトのヘルプのパッケージ化バイナリ セクションは、バイナリは持っていないが、ヘッダー ファイルとライブラリがたくさんあるという問題のコンテキストでは言うまでもなく、私にはあまり意味がありません。
taglib-ruby と Heroku についてこの質問をした他の人は、私にとっては問題なく完了した cmake のインストールに成功していません。また、Ruby/Rails のカスタム ビルドパックにライブラリを含める方法を説明するリソースを見つけることができませんでした。アプリ。
どんな助けでも大歓迎です。お時間をいただきありがとうございます。