Rails Resource Pipeline Cannot Find One Specific Image

I have a specific image called ui-icons_ffffff_256x240.png . In production, it can be found, among other places, in public/assets/images/ui-icons_ffffff_256x240.png .

When I try to view this image during production, I get the following error:

 ActionController::RoutingError (No route matches [GET] "/assets/images/ui-icons_ffffff_256x240.png"): 

I find this extremely strange since the image certainly is:

 $ find . -name ui-icons_ffffff_256x240.png ./vendor/assets/stylesheets/jquery-ui/images/ui-icons_ffffff_256x240.png ./public/assets/jquery-ui/images/ui-icons_ffffff_256x240.png ./public/assets/images/ui-icons_ffffff_256x240.png 

All other images in my application work fine and were forever. I recently updated my version of jQuery UI and this one particular image does not want to work. (I think this is the only jQuery UI image that I actually use.)

I'm on Rails 3.2.1. What could be the problem?

+4
source share
1 answer

Your js plugin is requesting an image with an invalid resource url. Access to the object can be obtained using

 /assets/ui-icons_ffffff_256x240.png 

But the requested URL

 /assets/images/ui-icons_ffffff_256x240.png 

So, in your javascript or stylesheet, you need to manually fix the resource url.

+5
source

All Articles