RMagick

Does anyone know how to solve ‘No such file to load – RMagick’ on
‘Instant Rails’?

Rong wrote:

*** 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.

What do I need to do?

Install the headers for ImageMagick. If you’re using a distro with a
package manager, it will probably end in -dev.

Ok, I just looked in the Ubuntu 8.10 manager and you want something
along the lines of libgraphicsmagick1-dev

But that’s just a guess, I don’t know exactly. However, if you’re using
Ubuntu you can just use synaptic to install rmagick and save yourself a
bunch of hassle :slight_smile:

=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.

I have fixed the problem above. I am running os x 10.5.6.
I am now getting a different error.

Last login: Thu Feb 26 15:26:59 on ttys000
ronald-greens-imac:~ ron$ convert logo: logo.gif
ronald-greens-imac:~ ron$ display logo.gif
X connection to /tmp/launch-30Nznb/:0 broken (explicit kill or server
shutdown).
ronald-greens-imac:~ ron$ sudo gem install rmagick
Password:
Building native extensions. This could take a while…
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install rmagick
checking for Ruby version >= 1.8.2… yes
checking for gcc… yes
checking for Magick-config… yes
checking for ImageMagick version >= 6.3.0… yes
checking for HDRI disabled version of ImageMagick… yes
checking for stdint.h… *** 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.

GCC is installed.

Rong wrote:

Building native extensions. This could take a while…
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.

stdint.h is part of the C library. This should be installed along with
a C compiler. Please tell me you’re not trying to compile a C extension
without a C compiler?

=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.

On Feb 26, 2009, at 4:54 PM, Rong wrote:

GCC is installed.

Have you tried either the osx installer from rubyforge (automated
build from source: http://is.gd/l6pP ), or have you built the whole
shebang from scratch yourself using http://is.gd/glSd

I followed the second procedure myself with few problems.

Cheers–

Charles

Charles J.
Advanced Computing Center for Research and Education
Vanderbilt University

Rong wrote:

GCC is installed.

Oh sorry, I was a little blind there. So have you checked to see
whether /usr/include/stdint.h exists?

=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.

Charles, trying to install the gem.

On Feb 27, 9:08 am, Charles J.

Rong wrote:

I have fixed the problem above. I am running os x 10.5.6.
I am now getting a different error.
(snip)
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.

What does the mkmf.log file have to say?

Yes. At the end of the os x install instructions are 3 test commands
that all work perfectly.

On Feb 27, 1:08 pm, Charles J.

And imagemagick installed without issues?

Cheers–

Charles
On Feb 27, 2009, at 12:57 PM, Rong wrote:

shebang from scratch yourself usinghttp://is.gd/glSd


Charles J.
Advanced Computing Center for Research and Education
Vanderbilt University
[email protected]
Office: 615-343-2776
Cell: 615-478-8799

On Feb 27, 2009, at 2:24 PM, Rong wrote:

Yes. At the end of the os x install instructions are 3 test commands
that all work perfectly.

On Feb 27, 1:08 pm, Charles J.
[email protected] wrote:

My conclusion would be, then, that the gem does not like ruby 1.9 just
yet. I am no help there, sorry.

Cheers–

Charles

Charles J.
Advanced Computing Center for Research and Education
Vanderbilt University

Don’t know where it is.

Charles J. wrote:

yet. I am no help there, sorry.

RMagick works just fine with 1.9.1. I’m waiting for the O.P. to show his
mkmf.log.

I am running Ruby 1.9.1. Does that matter?

On Feb 26, 11:02 pm, Rong [email protected] wrote:

Don’t know where it is.

/usr/local/lib/ruby/gems/1.8/gems/rmagick-2.9.1/ext/RMagick/mkmf.log

MKMF.log

: checking for Ruby version >= 1.8.2... -------------------- yes

find_executable: checking for gcc… -------------------- yes


find_executable: checking for Magick-config… --------------------
yes


: checking for ImageMagick version >= 6.3.0... -------------------- yes
: checking for HDRI disabled version of ImageMagick... -------------------- yes

I found it.
Here is the line(s) referenced.

def try_do(src, command, &b)
unless have_devel?
raise <<MSG
The complier failed to generate an executable file.
You have to install development tools first.
MSG
end
src = create_tmpsrc(src, &b)
xsystem(command)
ensure
log_src(src)
rm_rf ‘conftest.dSYM’
end

mkmf.log

: checking for Ruby version >= 1.8.2... -------------------- yes

find_executable: checking for gcc… -------------------- yes


find_executable: checking for Magick-config… --------------------
yes


: checking for ImageMagick version >= 6.3.0... -------------------- yes
: checking for HDRI disabled version of ImageMagick... -------------------- yes

Rong wrote:

find_executable: checking for Magick-config… --------------------
-------------------- yes

My conclusion would be, then, that the gem does not like ruby 1.9 just
yet. I am no help there, sorry.
RMagick works just fine with 1.9.1. I’m waiting for the O.P. to show his
mkmf.log.


RMagick:http://rmagick.rubyforge.org/

This can’t be all of it. It doesn’t include the failure you described in
your post:

checking for stdint.h… *** extconf.rb failed ***

Why don’t you start over and post the output from “gem install” and then
mkmf.log? Also, where did you get the XCode Tools (install disk?
download?), how did you install ImageMagick, and what’s the output from

gcc --version