How to solve Magick::ImageMagickError: no decode delegate for this image format in AdvertisementControllerTest#test_image_paths_should_return_png Question
+1
−0
I ran tests (bin/rails test
) and got
Error:
AdvertisementControllerTest#test_image_paths_should_return_png:
Magick::ImageMagickError: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572
app/helpers/advertisements/codidact_helper.rb:23:in `annotate'
app/helpers/advertisements/codidact_helper.rb:23:in `block in codidact_ad'
config/initializers/namespaced_cache.rb:11:in `block (2 levels) in <class:NamespacedEnvCache>'
app/helpers/advertisements/codidact_helper.rb:8:in `codidact_ad'
app/controllers/advertisement_controller.rb:14:in `codidact'
test/controllers/advertisement_controller_test.rb:16:in `block (2 levels) in <class:AdvertisementControllerTest>'
test/controllers/advertisement_controller_test.rb:15:in `each'
test/controllers/advertisement_controller_test.rb:15:in `block in <class:AdvertisementControllerTest>'
Version of ImageMagick is 7.1.0-19 and was built from source. It might be related this Stripe::AuthenticationError because it happens in the AdvertisementControllerTest and on Circle CI, the tests seem to run fine.
1 answer
+1
−0
I have this error in my local environment too, and I've not been able to figure it out yet. It's somehow related to ImageMagick being built (or not) with the right image libraries, but as far as I can tell my environment has all the right libraries already...
As a workaround, you can just skip running these particular tests and only run the tests relating to what you're working on - this doesn't affect production.
0 comment threads