Facing issues with rmagic gem while installing in Windows machine and it is for Rails 3 application.. ruby version 1.8.7

二次信任 提交于 2019-12-12 01:35:37

问题


I am facing issues with rmagic gem while installing in Windows machine and it is for Rails 3 application.. ruby version 1.8.7

Fetching source index for http://rubygems.org/ Fetching source index
for http://gemcutter.com/ Could not reach rubygems repository
http://rubygems.org/, http://gemcutter.com/, 
http://gems.rubyforge.org/, http://gems.aptana.com/,
http://gems.github.com/ Fetching source index for
http://gems.rubyforge.org/ Fetching source index for
http://gems.aptana.com/ Fetching source index for
http://gems.github.com/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.1)
Using builder (2.1.2)
Using i18n (0.4.2)
Using activemodel (3.0.1)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.6)
Using tzinfo  (0.3.23)
Using actionpack (3.0.1)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.8)
Using mail (2.2.9)
Using actionmailer (3.0.1)
Using arel (1.0.1)
Using activerecord (3.0.1)
Using activeresource (3.0.1)
Using bundler (1.0.7)
Using gdata (1.1.1)
Using json (1.4.6)
Using contacts (1.2.4)
Using fastercsv (1.5.3)
Using hpricot (0.8.3)
Using mysql (2.8.1)
Using packet (0.1.15)
Using thor (0.14.4)
Using railties (3.0.1)
Using rails (3.0.1)
Installing rmagick (2.12.0) Temporarily enhancing PATH to include DevKit with native extensions
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/installer.rb:4 83:in
`build_extensions': ERROR: Failed to build gem native extension.
(Gem::Ins taller::ExtensionBuildError)

C:/Ruby187/bin/ruby.exe extconf.rb 
checking for Ruby version >= 1.8.5... yes 
checking for stdint.h... yes
checking for sys/types.h... yes 
checking for wand/MagickWand.h... no

Can't install RMagick 2.12.0. Can't find MagickWand.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
        --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:/Ruby187/bin/ruby
Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/rmagick-2.12.0 for inspection.
Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/rmagick-2.12.0/ext/RMagick/gem_make.out
from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `each'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `build_extensions'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in `install'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `run'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `send'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
from C:/Ruby187/bin/bundle:19:in `load'
from C:/Ruby187/bin/bundle:19

回答1:


Install ImageMagick first, and make sure the header files can be found when installing the gem.

Also, use proper indentation of your code to make it readable.




回答2:


You should install the rmagick-win32 gem. Follow instructions as per the answer in this question



来源:https://stackoverflow.com/questions/4469042/facing-issues-with-rmagic-gem-while-installing-in-windows-machine-and-it-is-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!