Error installing rmagick: ERROR: Failed to create custom gem extension

I am trying to install RmMagic using the following command:

gem install rmagick -v = 2.12.2

After running this command, I am getting some error:

Temporarily enhancing PATH to include DevKit ...
Building native extensions. This could take a while ...
ERROR: Error installing rmagick:
        ERROR: Failed to build gem native extension.


        D: /ruby/bin/ruby.exe extconf.rb
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
        --without-opt-include = $ {opt-dir} / include
        --with-opt-lib
        --without-opt-lib = $ {opt-dir} / lib
        --with-make-prog
        --without-make-prog
        --srcdir =.
        --curdir
        --ruby = D: / ruby ​​/ bin / ruby


Gem files will remain installed in D: /ruby/lib/ruby/gems/1.8/gems/rmagick-2
.12.2 for inspection.
Results logged to D: /ruby/lib/ruby/gems/1.8/gems/rmagick-2.12.2/ext/RMagick
/gem_make.out

Please help me in this regard. Thanks in advance.

+3


source to share


2 answers


I had the same issue with rmagick to get it resolved. System Environment Variable

CLASSPATH .;C:\ImageMagick-6.5.6-Q8\include

lib C:\ImageMagick-6.5.6-Q8\lib

      



Then do

gem install rmagick  --platform=ruby -- --with-opt-lib=C:\ImageMagick-6.5.6-Q8\lib --with-opt-include=C:\ImageMagick-6.5.6-Q8\include

      

+2


source


What a pain it was ... I definitely needed to do both the system environment variables and the specific command syntax suggested by Mukesh

To clarify two steps: (for other newbies like me)

Select properties from the Computer context menu, click Advanced System Settings, click Environment Variables, click New under System Variables,

use CLASSPATH for variable name and for value use:



.;C:\ImageMagick-6.9.0-Q16\include;lib C:\ImageMagick-6.9.0-Q16\lib

Then start a command line with Ruby terminal as administrator and run:

gem install rmagick -v '2.13.4' -- --with-opt-lib=C:\ImageMagick-6.9.0-Q16\lib --with-opt-include=C:\ImageMagick-6.9.0-Q16\include

(*** Be sure to update the version number in both the Variable command and the gem if needed)

0


source







All Articles