specific file name "loading-spinner.gif" cannot be found in Rails 6.1

29 Views Asked by At

After upgrading from Rails 6 to 6.1 I get the following error:

2023-04-25 13:14:34 -0400 Rack app ("GET /assets/v1-5/loading-spinner.gif" - (127.0.0.1)): #<ActionController::RoutingError: No route matches [GET] "/loading-spinner.gif">

when trying to load the asset as generated by this tag:

<%= image_tag('loading-spinner.gif', class: "preloader-spinner", id: "preloader_spinner") %>

BUT PLEASE READ THIS:

If I change the name of the asset from loading-spinner.gif to just spinner.gif the error goes away.

The only place there is a file named loading-spinner.gif is in app/assets/images

AGAIN TO REITERATE

Just by renaming the file (and using the name in the asset tag) the problem goes away.

I have checked various ways to make sure there are no funny characters in the file name, including recreating the file.

AND FINALLY TO ADD WEIRDNESS

The same problem occurs with another file named loading-ellipsis.gif

I HAVE DOUBLE AND TRIPLE checked that these names are not used ANYWHERE ELSE IN THE APP.

Hopefully someone can shed some light on this?

Note this is a large app so its not easy to provide some limited test case.

Note this just started after the upgrade from Rails 6.0 to Rails 6.1

0

There are 0 best solutions below