简体   繁体   中英

Why doesn't rmagick work with devkit

I'm having some difficulty installing rmagick when imagemagick and devkit don't work on windows 10. It keeps stating that devkit could not make a native gem extension. There aren't many resources on the internet that discuss this problem with windows 10, so I have the same issue repeatedly. Does anyone know how to fix this problem?

We have ImageMagick & rmagick working on Windows 10.

在此处输入图片说明

在此处输入图片说明

Installation is a little tricky. I'll detail how we did it - I'll gladly jump into chat if you need help with it:


  1. Download & Install ImageMagick

Firstly download the ImageMagick version for your variant of Windows. We're running x64, it should work in x32. The big thing is getting the right version (some don't work).

As can be seen, we're running ImageMagick 6.9.2 - we'd recommend getting this or the newer version of 6.9.3 :

在此处输入图片说明

IMPORTANT!! You need to download the dll version (not static ) (this includes the C Headers ). The C Headers are used by rmagick to build the gem's extensions. If you don't have them, the gem won't install.

ALSO!! Install ImageMagick into a path without spaces .


  1. Install rmagick

You need to reference the installed ImageMagick files:

gem install rmagick --platform=ruby -- --with-opt-dir="C:/path/to/image/magick"

Notice the forward-slashes

The trick we had to use was using forward slashes with our path. If we didn't do that, it wouldn't work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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