0

My env:rvm ruby 1.9.2 , and I build ImageMagick 6.7.4-6 from source.

When I install rmagick, it says:

/home/rocky/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first.

However, I also have ruby 1.8.7 in my rvm, and the rmagick can be installed correctly in 1.8.7. So I'm very confused what I missed in 1.9.2.

Bert Goethals
  • 7,867
  • 2
  • 20
  • 32
Rocky
  • 5,486
  • 8
  • 32
  • 36
  • 1
    My answer here: http://stackoverflow.com/questions/8872447/error-undefined-method-when-installing-imagemagick-through-homebrew might help. – Michael Durrant Jan 17 '12 at 05:53
  • Sounds like Ruby is having trouble finding the GCC compiler so it can't compile the RMagick source code. You'd have to look and see how to set that, possibly using `setenv`... not sure. – iwasrobbed Jan 17 '12 at 06:18

2 Answers2

1

Try following

Hope, Your environment is ububtu

sudo apt-get install libmagickwand-dev

gem install rmagick

Shamith c
  • 3,719
  • 3
  • 25
  • 33
  • Thanks, unfortunately, my environment is AndLinux. Which is not update for a long time. The repository only has a very old imagemagick, actually, that's why I need to compile from source. – Rocky Jan 17 '12 at 07:38
0

Thanks to Michael's answer, the key is to configure ImageMagick with this:

./configure --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8

Rocky
  • 5,486
  • 8
  • 32
  • 36