I am trying load a file in controller, like
Avatar.all.each do |avatar|
if avatar.avatar_file_name
file = "lib/data/#{avatar.avatar_file_name}"
image = MiniMagick::Image.open("#{file}")
...
end
end
But whenever I run this code, I get the error message
MiniMagick::Invalid
I already tried to reinstall the imagemagick as is mentioned here, but it didn't really help me.
Where could be a problem? Am I missing a component or something? Thank you