Rails 5.2: Active Storage Variants service_url throwing "no such key" error in browser

Viewed 184

I am using rails 5.2, active_storage with image_magic and minimagick for creating variants of different sizes, I am using the following code to generate the variants:

attachment.variant(combine_options: {
                          resize: "#{size}x#{size}^",
                          extent: "#{size}x#{size}",
                          gravity: 'center',
                          quality: 95 }
                        ).service_url

Variants are created successfully and loaded in browser using url generated by service_url method but on production is throwing following error:

enter image description here

It works perfectly fine if I don't create the variants.

0 Answers
Related