我需要为我的应用程序安装 Rmagick,所以我已经搜索了几乎所有与我在 web 和 stakeoverflow 上的问题相关的问题,但这些都不适合我。我也跟着这个,但没有奏效
http://stackoverflow.com/questions/6473853/ruby-on-rails-rmagick-on-windows-7
我的 Ruby 版本 -> 1.9.3
Rails 版本 -> 3.2.9
ImageMagick 版本->ImageMagick-6.8.3-2-Q16-x86-dll.exe
我在这里安装了 ImageMagick -> C:\ImageMagick-6.8.3-Q16
我打开 CMD 然后输入
gem install rmagick --platform=ruby -- --with-opt-lib=C:\ImageMagick-6.8.3-Q16\lib --with-opt-include=C:\ImageMagick-6.8.3-Q16\include
错误是
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
d:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb --with-opt-lib=C:ImageMagick-6.8.3-Q16lib --with-opt-include=C:ImageMagick-6.8
.3-Q16include
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** 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
--without-opt-dir
--with-opt-include=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=d:/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in d:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2 for inspection.
Results logged to d:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out