Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred while installing rmagick (2.13.2), and Bundler cannot continue [duplicate]

using gem magick' and am using rails 3.1.0

Fetching gem metadata from http://rubygems.org/.........  Fetching additional metadata from http://rubygems.org/..  Resolving dependencies...   Using rake (10.1.1) Using multi_json (1.8.4) Using activesupport (3.1.0) Using bcrypt-ruby (3.0.1) Using builder (3.0.4) Using i18n (0.6.9) Using activemodel (3.1.0) Using erubis (2.7.0) Using rack (1.3.10) Using rack-cache (1.0.3) Using rack-mount (0.8.3) Using rack-test (0.6.2) Using hike (1.2.3) Using tilt (1.3.7) Using sprockets (2.0.4) Using actionpack (3.1.0) Using mime-types (1.25.1) Using polyglot (0.3.4) Using treetop (1.4.15) Using mail (2.3.3) Using actionmailer (3.1.0) Using arel (2.2.3) Using tzinfo (0.3.38) Using activerecord (3.1.0) Using activeresource (3.1.0) Using ansi (1.4.3) Using bundler (1.5.2) Using carrierwave (0.5.8) Using coffee-script-source (1.7.0) Using execjs (2.0.2) Using coffee-script (2.2.0) Using rack-ssl (1.3.3) Using json (1.8.1) Using rdoc (3.12.2) Using thor (0.14.6) Using railties (3.1.0) Using coffee-rails (3.1.1) Using jquery-rails (3.1.0) Using mysql2 (0.3.15) Using rails (3.1.0)   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.           /usr/bin/ruby1.9.1 extconf.rb  checking for Ruby version >= 1.8.5... yes checking for gcc... yes  checking for Magick-config... no Can't install RMagick 2.13.2. Can't find Magick-config in /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games  *** 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=/usr/bin/ruby1.9.1   Gem files will remain installed in /home/rithujadav/.bundler/tmp/3624/gems/rmagick-2.13.2 for inspection.  Results logged to /home/rithujadav/.bundler/tmp/3624/gems/rmagick-2.13.2/ext/RMagick/gem_make.out  An error occurred while installing rmagick (2.13.2), and Bundler cannot continue. Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling. 
like image 551
venu Avatar asked Feb 20 '14 08:02

venu


2 Answers

You should install ImageMagick first:

sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev 
like image 142
Marek Lipka Avatar answered Sep 28 '22 00:09

Marek Lipka


On Mac, I did brew install imagemagick.

That successfully allowed me to run gem install rmagick -v '2.13.2' without issues.

like image 37
xke Avatar answered Sep 27 '22 23:09

xke