我正在使用carrierwave將圖像上傳到我的項目,以及Ryan Bates的railscasts here。無法安裝gem rmagick [Windows 7 64位]
我使用紅寶石1.9.2p290(2011-07-09)[I386-的mingw32]和軌道3.1.0
在這裏面,纔能有使用rmagick您必須安裝它在說情節你的Gemfile像這樣
的Gemfile
gem 'rmagick'
,然後運行bundle安裝我的錯誤
Installing rmagick (2.13.1) with native extensions C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR
: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
C:/Ruby192/bin/ruby.exe extconf.rb
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
--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:/Ruby192/bin/ruby
所以我用Google搜索了無法獲取ImageMagick的版本,發現這個鏈接here和遵循的方向,下載RMagick-2.13.1.tar.gz,解壓到C:\ rmagick,並運行
ruby setup.rb command
和出現以下錯誤。
c:\RMagick-2.13.1>ruby setup.rb
---> lib
---> lib/rvg
<--- lib/rvg
<--- lib
---> ext
---> ext/RMagick
C:/Ruby192/bin/ruby.exe c:/RMagick-2.13.1/ext/RMagick/extconf.rb
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** c:/RMagick-2.13.1/ext/RMagick/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.
再次,錯誤無法獲取ImageMagick版本。我認爲Imagemagick與Windows安裝捆綁在一起。任何人在這件事情上有任何幫助?
太棒了。我在看minimagick,但決定嘗試和強硬。我會接受你的建議,並在這一個上放棄RMagick。 – ruevaughn 2012-04-27 03:09:04