我尝试过许多不同的资源,包括这些: redmine rmagick wiki tutorial 但我仍然得到这个错误。
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-dir="C:\ImageMagick"'
This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rmag
ick-2.16.0/ext/RMagick
C:/RailsInstaller/Ruby2.2.0/bin/ruby.exe -r ./siteconf20170112-3020-wa31th.rb ex
tconf.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:/RailsInstaller/Ruby2.2.0/bin/$(RUBY_BASE_NAME)
extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENO
ENT)
from extconf.rb:141:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2
.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/extensions/x86
-mingw32/2.2.0/rmagick-2.16.0/gem_make.out
以下是我所做的事情清单:
- 下载了ImageMagick二进制文件
- 安装并设置了C和C ++头文件
- 添加了正确的路径(在wiki中提到)指向下载文件
- 安装了
rmagick
gem并将其指向二进制文件下载
rmagick
gem,因为它只是它的绑定,但它似乎比原始下载更好。如果有人成功完成这个操作,我会非常感激任何帮助。
值得注意的是,我不一定要使用Paperclip + ImageMagick,如果有另一个适用于此的库,我也很乐意使用。