Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing RMagick Gem

I just wanted to gem install rmagick

and got this:

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

/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
    from extconf.rb:1

ImageMagick and libmagickwand-dev is already installed.

Using Ubuntu Linux.

Any help?

Yours, Joern.

like image 564
Joern Akkermann Avatar asked Feb 04 '11 14:02

Joern Akkermann


2 Answers

use rvm to install ruby (preferred) or use apt-get install ruby ruby-dev

aptitude install build-essential imagemagick libmagickcore-dev libmagickwand-dev
gem install rmagick

--Edit 1--

sudo apt-get install ruby-dev

You will also need ruby-dev (or ruby-full) for successfully compiling the RMagick before gem install.

like image 146
c2h2 Avatar answered Oct 18 '22 12:10

c2h2


sudo apt-get install imagemagick libmagickwand-dev

gem install rmagick

or

in gem file

gem 'rmagick'

then run

bundle install

like image 40
Jigar Bhatt Avatar answered Oct 18 '22 12:10

Jigar Bhatt