Post History
#2: Post edited
- 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. It might be related this [Stripe::AuthenticationError](https://collab.codidact.org/posts/285410) because it happens in the AdvertisementControllerTest and on Circle CI, the tests seem to run fine.
- 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](https://collab.codidact.org/posts/285410) because it happens in the AdvertisementControllerTest and on Circle CI, the tests seem to run fine.
#1: Initial revision
How to solve Magick::ImageMagickError: no decode delegate for this image format in AdvertisementControllerTest#test_image_paths_should_return_png
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. It might be related this [Stripe::AuthenticationError](https://collab.codidact.org/posts/285410) because it happens in the AdvertisementControllerTest and on Circle CI, the tests seem to run fine.