ImageMagick and Paperclip on Rails only accepts bmp file
Asked Answered
O

4

9

I'm trying to set up a rails app with paperclip and ImageMagick on Ubunutu 10.10, I have managed to make it work but only with bmp files, when i try to upload any other kind of file I get the error:

Image Paperclip::CommandNotFoundError
Image Paperclip::CommandNotFoundError

I thought it had something to do with ImageMagic so I found this old tutorial

http://www.randycullom.com/chatterbox/archives/2006/12/installing_imag.html

So I uninstall ImageMagick, installed jpg,tiff and png libraries, on jgp library I used

./configure --enable-shared ...

And then install ImageMagic with configure

./configure --enable-lzw=yes --enable-shared=yes --disable-static --without-perl make sudo make install

and the error still apears, on my enviroment.rb I have

Paperclip.options[:command_path] = "/usr/local/bin/"

Which is the path than running 'which convert' gave me, on gem file:

gem "paperclip", "~> 2.3" gem 'rmagick'

What am I missing? Help would be much appreciated.

Orgel answered 24/3, 2011 at 6:33 Comment(0)
S
20

On Ubuntu, you can usually safely intall ImageMagick via apt-get (or aptitude). Normally I do:

sudo apt-get install imagemagick
sudo apt-get install libmagick9-dev [deprecated]
sudo gem install rmagick

Edited

use instead of libmagick9-dev

sudo apt-get install graphicsmagick-libmagick-dev-compat
Sunder answered 24/3, 2011 at 6:51 Comment(2)
Works for me on Ubuntu 12.10Raama
I needed to install some other packages. Too make it work @ Ubuntu 14.04: sudo apt-get install libmagickcore-dev libmagickwand-devChan
C
7

Update from @bartuzz comment

Ubuntu 14.04: sudo apt-get install libmagickcore-dev libmagickwand-dev

Contribution answered 11/7, 2014 at 15:26 Comment(0)
G
7

Following on from the other answers (@Callmeed, @arturtr), for Ubuntu 14.04

sudo apt-get install imagemagick
sudo apt-get install graphicsmagick-libmagick-dev-compat
sudo apt-get install libmagickcore-dev libmagickwand-dev

worked for me, but installing rmagick without the sudo

gem install rmagick
Gluck answered 1/4, 2015 at 15:34 Comment(0)
P
2

Ubuntu 16.04: sudo apt-get -y install imagemagick libmagickcore-dev libmagickwand-dev

Pinworm answered 8/7, 2017 at 19:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.