你如何让 rmagick 在带有 rails 3.1 和carrierwave 的windows 7 64 位上工作? [英] how do you get rmagick to work on windows 7 64-bit with rails 3.1 and carrierwave?
本文介绍了你如何让 rmagick 在带有 rails 3.1 和carrierwave 的windows 7 64 位上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法让 rmagick 在 Windows 上工作.有谁知道如何使其正常工作?更好的是,希望以一种与生产环境兼容的方式,尽管我会尽我所能.
I'm having trouble getting rmagick to work on windows. Does anyone know how to get this working correctly? And even better, hopefully in a way that is compatible with a production environment, although I'll take whatever I can get.
C:\> gem install rmagick --platform=ruby -- --with-opt-lib=%IMAGE_MAGICK_HOME%/lib --with-opt-include=%IMAGE_MAGICK_HOME%/include
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
c:/ruby192/bin/ruby.exe extconf.rb --with-opt-lib=C:\Program Files (x86)\ImageMagick-6.7.0-Q16/lib --with-opt-include=C:\Program Fil
es (x86)\ImageMagick-6.7.0-Q16/include
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... *** 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=c:/ruby192/bin/ruby
c:/ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from c:/ruby192/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'
from extconf.rb:193:in `<main>'
Gem files will remain installed in c:/ruby192/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1 for inspection.
Results logged to c:/ruby192/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
推荐答案
此线程中的答案使其在我的两台计算机上都能正常工作:Windows 上的RMagick
Answer in this thread made it work on both of my computer: RMagick on Windows
我希望它对你也有用!
这篇关于你如何让 rmagick 在带有 rails 3.1 和carrierwave 的windows 7 64 位上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文