2015-05-18 15 views
8

Nella mia app Rails, ho appena rimosso Rmagick e aggiunto Minimagick. Rmagick era troppo pesante. Le cose funzionavano bene con RMagick ma in minimagick ottengo il seguente errore:Dopo aver sostituito Rmagick con Minimagick, viene visualizzato l'errore "ident.im6: non decodifica delegato per questo formato immagine"

MiniMagick::Invalid: `identify /tmp/mini_magick20150518-10411-1qz42x8` failed with error: 
identify.im6: no decode delegate for this image format `/tmp/mini_magick20150518-10411-1qz42x8' @ error/constitute.c/ReadImage/544. 
from /home/pubudu/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mini_magick-4.2.4/lib/mini_magick/image.rb:200:in `rescue in validate!' 

l'URL del file:

[8] pry(main)> file.file.file 
=> "/home/pubudu/Projects/istockseller/public/store/photos/thpubs/istockseller-13642162-wallhaven-61582.jpg" 

Il codice im cercando di correre:

MiniMagick::Image.read(file.file.file).first 
+1

Che cosa si ottiene quando si digita questo nella console: identificare formato -list | grep JPG – errata

+1

Ottengo questo: 'JPG * JPEG rw- Formato JFIF di Joint Photographic Experts Group (80' Im in Ubuntu 14.04 – THpubs

+0

Sembra che [liblqr] (http://liblqr.wikidot.com/) non sia stato collegato correttamente. La tua applicazione è in attesa di ridimensionamento di liquidi - una funzionalità non richiesta da Minimagick. Devi ricostruire ImageMagick con '--with-lqr = yes' – emcconville

risposta

2

provare a reinstallare ImageMagick e aggiungere --with-jpeg=yes alla configurazione.

Run convert -list configure, e vedere se si dispone di jpeg sotto DELEGATES. In caso contrario, reinstall ImageMagick e aggiungere params a ./configure:

1. wget http://www.imagemagick.org/download/ImageMagick.tar.gz 
2. tar xvfz ImageMagick.tar.gz 
3. cd ImageMagick 
4. ./configure --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-shared 
5. make 
6. sudo make install 
7. sudo ldconfig /usr/local/lib 
8. run again "convert -list configure" and look at changes 

per ulteriori informazioni: Carrierwave Error Msg: Failed to manipulate with MiniMagick, maybe it is not an image?