Can't install Rmagick and Imagemagick on Windows 7

℡╲_俬逩灬. 提交于 2019-12-20 20:01:40

问题


when I run gem install rmagick-2.13.1.gem from the directory in which rmagick-2.13.1.gem is I get an Error saying that it failed to build gem native extension, below which it says

c:/Ruby192/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5 ... yes
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.

From what I know reading the answers to FAQs on http://rmagick.rubyforge.org/install-faq.html#os, rmagick should come bundled with ImageMagick Windows Installer. The answers also mention rmagick-win32.gem. I haven't seen it anywhere. That's why I'll assume that rmagick-2.13.1.gem is what I need since it's the only one availaible, considering that FAQs refer to the older version of rmagick. So, I'm really confused about what the damned problem is.

I also took a look at mkmf.log file and the only thing that I've found there is

checking for Ruby version >= 1.8.5 ... yes

This whole thing confuses the hell out of me. So, any help would be hugely appreciated. Thanks a lot in advance.


回答1:


Download zip file from: https://github.com/rmagick/rmagick/downloads

Unzip it in a local directory

CD to that directory and type

gem install rmagick --local

Done.

If you get errors you might want to read the Readme.html file in the Zipfile




回答2:


Exactly same problem.The "Read Me" in the downloaded Zip file now contains only this:

Hi, everyone -

We are no longer able to maintain RMagick and are looking for someone or some people to take over maintenance of it. If you're interested or want more details, please let us know at admin@obtdev.com!

It is a cool project, written in C and Ruby, with lots of great developers relying on it. The code, originally written by Tim Hunter, is clean and easy-to-understand, and there are a lot of directions you could take it to make it even more useful.

We've had to stop maintaining it due to ever-increasing constraints on our time.

Thanks, - Benjamin and Omer.




回答3:


Try

gem install win32-service --platform=mswin32
gem install rmagick --platform=mswin32



回答4:


First of all clear your path environment variables. (This is the main step that people often skip, but very important). This is the main reason for the error you're facing.

Then install the rails installer (2.0.0) from here : http://railsinstaller.org/en

It'll set up ruby, rails, and everything else you need. This will also set up your environment path variables for you as well.

Next install imagemagick 6.7.9.9 or lower and while installing check the option to include C headers. Make sure you install it within the rails installer folder.

Then type this in your command prompt path=c:\RailsInstaller\ImageMagick-6.7.9-Q8;%path% or whatever version you have.

Then type

gem install rmagick -- '--with-opt-dir="c:\RailsInstaller\ImageMagick-6.7.9-Q8"'

Finally edit C:\RailsInstaller\Ruby2.0.0\setup_environment.bat to include the path to ImageMagic

At line 25: SET PATH=c:\RailsInstaller\ImageMagick-6.7.9-Q8; or whatever version you have




回答5:


use rmagick2 for Ruby 1.8.2 and later, including Ruby 1.9 ImageMagick 6.3.0-7 or later RMagick 2 is the future of RMagick. This is the version that will get new methods and support new ImageMagick features.



来源:https://stackoverflow.com/questions/3940554/cant-install-rmagick-and-imagemagick-on-windows-7

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