質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

RubyGems

RubyGemsはRubyによるプログラミングのためのパッケージマネジメントツールです。ユーザはこれを使用することで、Rubyライブラリのダウンロードやアップデートや、依存関係の自動解決が可能になります。

Ruby on Rails 4

Ruby on Rails4はRubyによって書かれたオープンソースのウェブフレームワークです。 Ruby on Railsは「設定より規約」の原則に従っており、効率的に作業を行うために再開発を行う必要をなくしてくれます。

Q&A

0回答

2282閲覧

heroku上のRails4に gem 'ruby-filemagic' のインストールエラーを解消したい

req

総合スコア8

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

RubyGems

RubyGemsはRubyによるプログラミングのためのパッケージマネジメントツールです。ユーザはこれを使用することで、Rubyライブラリのダウンロードやアップデートや、依存関係の自動解決が可能になります。

Ruby on Rails 4

Ruby on Rails4はRubyによって書かれたオープンソースのウェブフレームワークです。 Ruby on Railsは「設定より規約」の原則に従っており、効率的に作業を行うために再開発を行う必要をなくしてくれます。

0グッド

0クリップ

投稿2015/12/07 16:14

以下の設定をしたうえで、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

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問