以下の設定をしたうえで、herokuにデプロイするとエラーが発生し
pushできない状況です。
エラーの対処方法をご存知でしたら助かります。
** Railsの各種ファイル設定 **
[Gemfile(抜粋)] gem 'rmagick' gem 'ruby-filemagic' [Aptfile] libmagic-dev [.buildpacks] https://github.com/ddollar/heroku-buildpack-apt https://github.com/heroku/heroku-buildpack-ruby
デプロイ実行
$ heroku buildpacks:set heroku/ruby (初回のみ) $ git push heroku master
…途中で以下のエラーが発生
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. remote: remote: /tmp/build_345a2ab9863c1b5f6f3b705d1d18afd1/vendor/ruby-2.0.0/bin/ruby extconf.rb remote: checking for main() in -lgnurx... no remote: checking for magic_open() in -lmagic... no remote: *** ERROR: missing required library to compile this module 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. remote: remote: Provided configuration options: remote: --with-opt-dir remote: --without-opt-dir remote: --with-opt-include remote: --without-opt-include=${opt-dir}/include remote: --with-opt-lib remote: --without-opt-lib=${opt-dir}/lib remote: --with-make-prog remote: --without-make-prog remote: --srcdir=. remote: --curdir remote: --ruby=/tmp/build_345a2ab9863c1b5f6f3b705d1d18afd1/vendor/ruby-2.0.0/bin/ruby remote: --with-magic-dir remote: --without-magic-dir remote: --with-magic-include remote: --without-magic-include=${magic-dir}/include remote: --with-magic-lib remote: --without-magic-lib=${magic-dir}/ remote: --with-gnurx-dir remote: --without-gnurx-dir remote: --with-gnurx-include remote: --without-gnurx-include=${gnurx-dir}/include remote: --with-gnurx-lib remote: --without-gnurx-lib=${gnurx-dir}/ remote: --with-gnurxlib remote: --without-gnurxlib remote: --with-magiclib remote: --without-magiclib remote: remote: remote: Gem files will remain installed in /tmp/build_345a2ab9863c1b5f6f3b705d1d18afd1/vendor/bundle/ruby/2.0.0/gems/ruby-filemagic-0.7.1 for inspection. remote: Results logged to /tmp/build_345a2ab9863c1b5f6f3b705d1d18afd1/vendor/bundle/ruby/2.0.0/gems/ruby-filemagic-0.7.1/ext/filemagic/gem_make.out remote: An error occurred while installing ruby-filemagic (0.7.1), and Bundler cannot remote: continue. remote: Make sure that `gem install ruby-filemagic -v '0.7.1'` succeeds before bundling. remote: ! remote: ! Failed to install gems via Bundler. r
…以降略
mkmf.log を確認
~ $ less /app/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0/rmagick-2.15.4/mkmf.log | grep error conftest.c:23:57: error: ‘RotationalBlurImage’ undeclared (first use in this function) collect2: error: ld returned 1 exit status conftest.c:23:57: error: ‘RotationalBlurImageChannel’ undeclared (first use in this function) collect2: error: ld returned 1 exit status
あなたの回答
tips
プレビュー