5

I'm running rails 4.1 and paperclip 4.2, after I deploy to AWS Elastic Beanstalk I cannot save files with paperclip to S3, I am getting an error:

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 do I install ImageMagick to ELB?

1 Answer 1

7

Turns out, you can SSH into your EC2 instance and install ImageMagick manually, the caveat is that manual changes will not persist if there are updates to the instance itself. The best way to do this is to create an .ebextensions folder and add a config file. Something that looks like this:

packages:
  yum:
    ImageMagick-devel: []

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.