Error: Validation failed: Image Failed to manipulate with MiniMagick, maybe it is not an image?

Original Error: You must have ImageMagick or GraphicsMagick installed)

Hey guys, how have you been?

Today, we are going to learn how to solve the following error message:

ActiveRecord::RecordInvalid (Validation failed: Image Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: You must have ImageMagick or GraphicsMagick installed):

Introduction

The error message happens when I try to save an uploaded file.

ActiveRecord::RecordInvalid (Validation failed: Image Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: You must have ImageMagick or GraphicsMagick installed)

Here's the snapshot of the server at the moment.

Here's the current Gemfile

My operating system is Deepin OS 20.7.1, a debian-based linux distribution.

You can check yours by running the following command:

lsb_release -a

1 - Repair broken dependencies

The -f, --fix-broken option attempts to correct a system with broken dependencies in place.

This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem.

Run the following command:

sudo apt --fix-broken install

You should be able to see something like this


2 - Install ImageMagick

sudo apt-get install imagemagick

You should get something like this

...


3 - Check if it's installed

identify -version

You should see something like this


4 - Test it again


5 - Celebrate

Conclusion

That's all for today. I hope this article helped you.

Let me know if you need any additional help.