Paperclip Cannot Find ImageMagick on AWS Elastic Beanstalk

I am running rails 4.1 and paperclip 4.2 after I deploy to AWS Elastic Beanstalk. I cannot save files using paperclip on S3, I get an error message:

Command :: file -b --mime '/tmp/308f17f99f5a4157c8839634d039b1c620141002-22818-7crhx4.jpg' Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/308f17f99f5a4157c8839634d039b1c620141002-22818-xo8669.jpg[0]' 2>/dev/null [paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.> 

Any ideas? How to install ImageMagick in ELB?

+5
source share
1 answer

It turns out that you can use SSH in your EC2 instance and manually install ImageMagick, the caveat is that manual changes will not be saved if there are updates to the instance itself. The best way to do this is to create a .ebextensions folder and add a configuration file. Something like this:

 packages: yum: ImageMagick-devel: [] 

Also, your .ebextensions should not be in your gitignore.

+6
source

Source: https://habr.com/ru/post/1203912/


All Articles