/ / Instalowanie RMagick Błąd w systemie Windows 7 w celu utworzenia obrazu za pomocą Ruby - ruby-on-rails, ruby, rmagick

Instalowanie błędu RMagick w systemie Windows 7 w celu utworzenia obrazu za pomocą Ruby - ruby-on-rails, ruby, rmagick

Chcę zainstalować ImageMagick. Korzystam z systemu Windows 7, ponieważ chcę utworzyć obraz za pomocą Ruby, ale kiedy użyłem polecenia gem install rmagick podczas korzystania z polecenia ekranowego Git Bash, dostałem ten błąd

c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for stdint.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:/RailsInstaller/Ruby1.9.3/bin/ruby
c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:381:in `try_do": The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:280:in `postpone"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for"
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:930:in `have_header"
from extconf.rb:194:in `<main>"

Odpowiedzi:

0 dla odpowiedzi № 1

Zainstaluj dev-kit dla rozszerzeń Windows c c ++ http://rubyinstaller.org/add-ons/devkit/


0 dla odpowiedzi nr 2

Chłopak
w końcu mam prawdziwą metodę instalacji na Windows 7

1- zainstaluj ImageMagick-6.7.9-0-Q16-windows-static.exe na ścieżce C: / ImageMagic
2 - zainstaluj ImageMagick-6.7.9-0-Q16-windows-dll.exe w ścieżce C: / ImageMagic
3- Wypakuj ImageMagick-6.8.8-2.tar do folderu i zmień jego nazwę na SourceCode, a następnie ustaw go na ścieżce C: / ImageMagic / SourceCode
4 - zainstaluj mingw-get-setup.exe na ścieżce C: / MinGW
5- Zdefiniuj zmienne środowiskowe dla użytkownika
ŚCIEŻKA - C: MinGWbin;

6- użył polecenia (gem install rmagick - "--with-opt-dir =" C: / ImageMagick "")
7 - otwórz Gemfile i ustaw (klejnot „rmagick”)
8 - wpisz polecenie (instalacja pakietu)

możesz śledzić ten artykuł
https://github.com/rmagick/rmagick/wiki

błąd mi się przydarzył, ponieważ zainstalowałem ImageMagick w wersji 6.8