【发布时间】:2016-05-03 17:46:19
【问题描述】:
我正在尝试安装一个将 rmagick 作为 Windows 10 依赖项的 gem。但每次我尝试安装它时,都会出现此错误:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160126-6648-ks1v6.rb extconf.rb -- with-opt-dir=C:/ImageMagick
*** 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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
extconf.rb:110:in ``': No such file or directory - identify -version (Errno::ENOENT)
from extconf.rb:110:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:517:in `new'
from extconf.rb:517:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22- x64/lib/ruby/gems/2.2.0/gems/rmagick-2.15.4 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64- mingw32/2.2.0/rmagick-2.15.4/gem_make.out
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-dir=C:/ImageMagick'
This could take a while...
我什至安装了 gem imagemagick,但它不允许我安装 rmagick。你应该如何在 Windows 10 上安装 rmagick?
【问题讨论】:
-
要记住的一件事是在安装 ImageMagick 后关闭并重新启动 CommandPrompt。只有这样“添加应用程序到系统路径”选项才会生效。
-
聚会迟到了。查看此answer,了解如何在 Windows 10 上安装
rmagik。
标签: ruby-on-rails ruby rubygems rmagick