Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > how to make "gem install rmagick" work?

Reply
Thread Tools

how to make "gem install rmagick" work?

 
 
Jian Lin
Guest
Posts: n/a
 
      07-21-2010
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>'
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Richard Conroy
Guest
Posts: n/a
 
      07-21-2010
[Note: parts of this message were removed to make it a legal post.]

On Wed, Jul 21, 2010 at 11:39 AM, Jian Lin <(E-Mail Removed)> 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.

--
http://richardconroy.blogspot.com

 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      07-21-2010
On Jul 21, 7:39*am, Jian Lin <(E-Mail Removed)> 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.
>


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
--
Luis Lavena
 
Reply With Quote
 
Guillaume Bloss
Guest
Posts: n/a
 
      07-21-2010
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.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Roger Pack
Guest
Posts: n/a
 
      07-21-2010
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
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      07-21-2010
On Jul 21, 12:50*pm, Guillaume Bloss <(E-Mail Removed)> 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

--
Luis Lavena
 
Reply With Quote
 
Charles Oliver Nutter
Guest
Posts: n/a
 
      07-22-2010
On Wed, Jul 21, 2010 at 4:04 AM, Richard Conroy
<(E-Mail Removed)> 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 Felgentreff...though of course
the native library issues that prevent running on Windows are no
different for us. Native sux.

- Charlie

 
Reply With Quote
 
Jarmo Pertman
Guest
Posts: n/a
 
      07-22-2010
There are already opened issues under RMagick for 1.9.1 and Windows:
http://rubyforge.org/tracker/index.p...id=12&atid=134
http://rubyforge.org/tracker/index.p...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/0...ingw32-work-d/

Jarmo


On Jul 22, 8:41*am, Charles Oliver Nutter <(E-Mail Removed)> wrote:
> On Wed, Jul 21, 2010 at 4:04 AM, Richard Conroy
>
> <(E-Mail Removed)> 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 Felgentreff...though of course
> the native library issues that prevent running on Windows are no
> different for us. Native sux.
>
> - Charlie


 
Reply With Quote
 
Guillaume Bloss
Guest
Posts: n/a
 
      07-22-2010
> I succeeded some time ago compiling RMagick to Ruby 1.9.1 by using
> instructions at
> http://www.waydotnet.com/blog/2010/0...ingw32-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
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Abder-Rahman Ali
Guest
Posts: n/a
 
      09-06-2010
Guillaume Bloss 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
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Install ruby on linux cluster from shared disk -- can I just "make install" on next server? bradjpeek Ruby 0 12-20-2006 09:34 PM
Ruby 1.8.3 preview 1. AIX 5.2. Bug in do-install-doc during make install Philippe Lucas Ruby 0 06-28-2005 12:59 PM
Can't seem to boot from XP install CD (after botched Linux install) Cloud Burst Computer Support 3 05-22-2004 02:52 PM
How to determine JDK install directory and/or do silent install of J2SE? RJGraham Java 8 02-14-2004 02:19 PM



Advertisments