How to make "gem install rmagick" work?

I wanted to install rmagick on Win7 but it can’t install:
Is there any way to make it work?

C:\>gem list -r rmagick

*** REMOTE GEMS ***

rmagick (2.13.1)
rmagick4j (0.3.7, 0.3.4 java)


C:\>gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

c:/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=c:/ruby/bin/ruby


Gem files will remain installed in

c:/ruby/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

C:\>ruby try.rb
c:/ruby/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/lib/RMagick.rb:11:in

require': no such file to load -- RMagick2.so (LoadError) from c:/ruby/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/lib/RMagick.rb:11:in<top (required)>’

        from try.rb:3:in `require'
        from try.rb:3:in `<main>'

On Wed, Jul 21, 2010 at 11:39 AM, Jian L. [email protected]
wrote:

I wanted to install rmagick on Win7 but it can’t install:
Is there any way to make it work?

C:>gem list -r rmagick

The rmagick dependencies are a challenge to install on Windows (and
other
platforms as well).
You will need to visit the project page and review the full instructions
(which are quite extensive).

RMagick is probably the most difficult gem to install on Windows that
actually works on it.

Alternatively the JRuby gem rmagick4j uses a completely different native
library to do the rendering
activities (Batik I think). As a result, its installation process is
considerably easier.

C;>jruby -S gem install rmagick4j

I don’t know if there are any API level discrepancies between rmagick
and
rmagick4j however.

On Jul 21, 7:39 am, Jian L. [email protected] wrote:

C:\>gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

RMagick compilation process is quite complicated, worse under Windows.

Please download the zip file that contains both the binary gem and the
correct precise ImageMagick version used to create the gem.

Read here for instructions:

http://rubyforge.org/frs/shownotes.php?release_id=39888

HTH

winter heat wrote:

I wanted to install rmagick on Win7 but it can’t install:
Is there any way to make it work?

C:\>gem list -r rmagick

*** REMOTE GEMS ***

rmagick (2.13.1)
rmagick4j (0.3.7, 0.3.4 java)


C:\>gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.

I’ve never seen that specific error message, but have had success
getting it to build.
I’m assuming you’re using a rubyinstaller build of ruby.
If so, install the devkit, then look for instructions on the gem list
http://wiki.github.com/oneclick/rubyinstaller/gem-list

specifically here are my own:
http://betterlogic.com/roger/?p=2186

@Luis
Unfortunately the binary gems released by the rmagick team on rubyforge
are 1.8.x only, last time I checked. Of course it’s been awhile since I
checked.

GL.
-r

On Jul 21, 12:50 pm, Guillaume B. [email protected] wrote:

I tried to install the rmagick_win32.zip but actually it does not works
with ruby 1.9.1 …

It clearly states that the gem is Ruby 1.8, not 1.9.1

I will try to compile it to get a working version with ruby1.9.1, but it
seems to be a very long work since I have to configure all depending
libraries by myself … and also I cant be sure it will works, but well
it’s a challenge, I work with windows and hate use old slow version …

Developer need to provide binaries for Ruby 1.9 since they link to
different Ruby runtime libraries.

Try first asking about it in the RubyForge page

I think I can try to download all sources of all required libraries and
try to compile it with mingw, following the linux instruction, but under
windows.

I believe you can build and link with binaries of ImageMagick as long
they provide header and libs needed.

By this error:

"Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed *** "

It is clear that is trying to look for an ImageMagick executable to
get the version, investigate inside extconf.rb to see what is doing.

I can’t help you more on this since I’m not familiar with ImageMagick
build process or internals.

Trying to fix gems to compile cleanly is a challenging task. Feel free
to jump for help at RubyInstaller project group:

http://groups.google.com/group/rubyinstaller

I tried to install the rmagick_win32.zip but actually it does not works
with ruby 1.9.1 …

I will try to compile it to get a working version with ruby1.9.1, but it
seems to be a very long work since I have to configure all depending
libraries by myself … and also I cant be sure it will works, but well
it’s a challenge, I work with windows and hate use old slow version …

I think I can try to download all sources of all required libraries and
try to compile it with mingw, following the linux instruction, but under
windows.

On Wed, Jul 21, 2010 at 4:04 AM, Richard C.
[email protected] wrote:

Alternatively the JRuby gem rmagick4j uses a completely different native
library to do the rendering
activities (Batik I think). As a result, its installation process is
considerably easier.

C;>jruby -S gem install rmagick4j

I don’t know if there are any API level discrepancies between rmagick and
rmagick4j however.

rmagick4j is definitely incomplete, but sometimes it has enough for
individual use cases.

And FWIW, it just uses Java2D libraries shipped with every JDK/JVM, so
there shouldn’t be any external dependencies (if I remember right).

Also of interest: rmagick almost installs and works now with JRuby’s
new C extension support, thanks to Tim F…though of course
the native library issues that prevent running on Windows are no
different for us. Native sux.

  • Charlie

There are already opened issues under RMagick for 1.9.1 and Windows:
http://rubyforge.org/tracker/index.php?func=detail&aid=27765&group_id=12&atid=134
http://rubyforge.org/tracker/index.php?func=detail&aid=6065&group_id=12&atid=134

I succeeded some time ago compiling RMagick to Ruby 1.9.1 by using
instructions at
http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/

Jarmo

On Jul 22, 8:41 am, Charles Oliver N. [email protected] wrote:

On Wed, Jul 21, 2010 at 4:04 AM, Richard C.

[email protected] wrote:

Alternatively the JRuby gem rmagick4j uses a completely different native
library to do the rendering
activities (Batik I think). As a result, its installation process is
considerably easier.

C
;>jruby -S gem install rmagick4j

Guillaume B. wrote:

I tried to install the rmagick_win32.zip but actually it does not works
with ruby 1.9.1 …

I will try to compile it to get a working version with ruby1.9.1, but it
seems to be a very long work since I have to configure all depending
libraries by myself … and also I cant be sure it will works, but well
it’s a challenge, I work with windows and hate use old slow version …

I think I can try to download all sources of all required libraries and
try to compile it with mingw, following the linux instruction, but under
windows.

Check this thread: http://www.ruby-forum.com/topic/204353#new

winter heat wrote in post #927097:

Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***

This happened to me because I was adding the ImageMagick directory to
the end of PATH.

It turns out extconf.rb tries to run ImageMagick’s “convert.exe” but
ends up running “C:\Windows\system32\convert.exe”.

So, put ImageMagick’s directory as the very first thing in your PATH.

I succeeded some time ago compiling RMagick to Ruby 1.9.1 by using
instructions at
http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/

succeed too, with ruby 1.9.1p429, and last imagemagick
version(6.6.3-0-Q16). That was easy in fact (not mentioning the 1h30 my
computer take to install the rdoc …)

I just followed the tuto on www.waydotnet.com, works fine. I made a gem,
but did not try on other version of ruby.

I’m not sure of that, but you should install imagemagick, and set
imagemagic in the path, with the imagemagic version used to build your
gem

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs