我正在使用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