在Heroku上安装Rmagick gem时出错

时间:2017-12-14 21:39:08

标签: ruby-on-rails-4 heroku carrierwave rmagick ruby-2.3

我正在尝试将Rails 4应用程序部署到heroku,但安装Rmackick gem失败了。 尝试过buildpacks,但是好运。

得到了这个错误:

remote:        Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:        
remote:        current directory:
remote:        /tmp/build_16e2e594c459dbc294186d524bfe933a/vendor/bundle/ruby/2.3.0/gems/rmagick-2.13.2/ext/RMagick
remote:        /tmp/build_16e2e594c459dbc294186d524bfe933a/vendor/ruby-2.3.0/bin/ruby -r
remote:        ./siteconf20171214-20333-dbtx1i.rb extconf.rb
remote:        checking for Ruby version >= 1.8.5... yes
remote:        checking for gcc... yes
remote:        checking for Magick-config... no
remote:        Can't install RMagick 2.13.2. Can't find Magick-config in
remote:        vendor/bundle/bin:vendor/bundle/ruby/2.3.0/bin:vendor/ruby-2.3.0/bin:/tmp/tmp.kJfUDQAIbQ/bin/:/usr/local/bin:/usr/bin:/bin:/tmp/codon/vendor/bin:bin:/usr/local/bin:/usr/bin:/bin
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.
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_16e2e594c459dbc294186d524bfe933a/vendor/ruby-2.3.0/bin/$(RUBY_BASE_NAME)

尝试: How can I use the latest version of Imagemagick on Heroku?

https://github.com/ello/heroku-buildpack-imagemagick

https://github.com/thoughtbot/paperclip/wiki/Upgrade-Imagemagick-On-Heroku

  • heroku / ruby​​ buildpack

宝石'载波' 宝石'rmagick',要求:'RMagick' 宝石'雾'

使用过宝石版本:

carrierwave (1.2.1)
rmagick (2.13.2)

1 个答案:

答案 0 :(得分:2)

更新版本的rmagick修复了这个问题,好像2.13.2与heroku堆栈不兼容。 2.16.0 - 作品