Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

Okay, as long as development can continue... (1 comment)

Sign up to answer this question »