Install Image-magick and rmagick for Rails


Start by removing any old versions previously installed via apt-get:

sudo apt-get remove imagemagick

Then update apt-get and install some supporting packages:

sudo apt-get update

*(sudo apt-get install
libperl-dev gcc libjpeg62-dev libbz2-dev
libtiff4-dev libwmf-dev libz-dev libpng12-dev
libx11-dev libxt-dev libxext-dev libxml2-dev
libfreetype6-dev liblcms1-dev libexif-dev perl
libjasper-dev libltdl3-dev graphviz gs-gpl pkg-config)*

*its a single line command.

get the Imagemagick package from this link:

http://www.imagemagick.org/script/install-source.php#unix

Once the source is downloaded, uncompress it:

tar -xzf ImageMagick.tar.gz

Now configure and make

cd ImageMagick-6.5.0-0
./configure
sudo make
sudo make install

Add the following line to ~/.bashrc:

export LD_LIBRARY_PATH=/usr/local/lib

Update: If you still get an error like the one above, try running ldconfig:

sudo ldconfig

You can confirm the install and available formats with:

identify -list format

Once Image magick is installed install rmagick gem by typing the command:

$sudo gem install rmagick

Source: Railscarma.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s