简体   繁体   English

如何在Windows 7 32位中为Ruby on Rails安装Rmagick和imageMagick

[英]How to install Rmagick and imageMagick for Ruby on Rails in windows 7 32 bit

i need to install Rmagick for my app so i have searched allmost all related my question on web and stakeoverflow too but non of these worked for me. 我需要为我的应用程序安装Rmagick,所以我已经搜索了所有相关的我的问题在网络和放样流程,但没有这些为我工作。 i have followed this too but not worked 我也遵循了这一点,但没有奏效

http://stackoverflow.com/questions/6473853/ruby-on-rails-rmagick-on-windows-7

My Ruby version -> 1.9.3 我的Ruby版本 - > 1.9.3

Rails version -> 3.2.9 Rails版本 - > 3.2.9

ImageMagick version ->ImageMagick-6.8.3-2-Q16-x86-dll.exe ImageMagick版本 - > ImageMagick-6.8.3-2-Q16-x86-dll.exe

i have installed ImageMagick here -> C:\\ImageMagick-6.8.3-Q16 我在这里安装了ImageMagick - > C:\\ ImageMagick-6.8.3-Q16

i opend CMD then typed 我打开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 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 is 错误是

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

Copying the answer from the comments in order to remove this question from the "Unanswered" filter: 复制评论中的答案,以便从“未答复”过滤器中删除此问题:

I found solution and its worked http://rorashish.blogspot.in/2012/08/installing-rmagick-with-imagemagic-on.html 我找到了解决方案并且工作了http://rorashish.blogspot.in/2012/08/installing-rmagick-with-imagemagic-on.html

~ answer per Gagan 〜每个Gagan回答

See the link above for the full details, but the high-level steps (as of 2012 August 9) are: 有关完整详细信息,请参阅上面的链接,但高级步骤(截至2012年8月9日)是:

  1. Install Ghostscript 安装Ghostscript
  2. Install Imagemagick (use the 32-bit version, as the 64-bit is not working) 安装Imagemagick(使用32位版本,因为64位不能正常工作)
  3. Restart the console/cmd prompt/IDE/... (or windows) 重启console / cmd提示符/ IDE / ...(或windows)
  4. Install rmagick 安装rmagick

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM