我需要为我的应用安装 Rmagick 我也在网络和 stakeoverflow 上搜索了几乎所有与我的问题相关的问题,但没有一个对我有用。 我也跟着这个但没有工作
http://stackoverflow.com/questions/6473853/ruby-on-rails-rmagick-on-windows-7
My Ruby version -> 1.9.3
Rails version -> 3.2.9
ImageMagick version ->ImageMagick-6.8.3-2-Q16-x86-dll.exe
i have installed ImageMagick here -> 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
最佳答案
从评论中复制答案以便从“未回答”过滤器中删除此问题:
I found solution and its worked http://rorashish.blogspot.in/2012/08/installing-rmagick-with-imagemagic-on.html
~ 根据 Gagan 回答
有关完整详细信息,请参阅上面的链接,但高级步骤(截至 2012 年 8 月 9 日)是:
- 安装 Ghostscript
- 安装 Imagemagick(使用 32 位版本,因为 64 位版本不工作)
- 重启控制台/cmd提示符/IDE/...(或windows)
- 安装 rmagick
关于ruby-on-rails - 如何在 Windows 7 32 位中为 Ruby on Rails 安装 Rmagick 和 imageMagick,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14974664/