我很難讓rmagick在windows上工作。有誰知道如何正確地工作?甚至更好,希望能夠與生產環境兼容,儘管我會盡我所能。你如何讓rmagick在Windows 7 64位上運行rails 3.1和carrierwave?
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
有什麼麻煩? – Zabba 2011-06-03 22:02:44
@Zabba:對於devkit,它將無法正確安裝。它需要它無法找到的庫。我試圖下載imagemagick和rmagick並編譯它們,但是當我嘗試編譯rmagick時失敗了。 devkit只是沒有做它我應該做的事情,我不認爲。基本上,'gem install rmagick'不會'正常工作' - 遠離它:/ – 2011-06-03 23:59:35