I'm getting the following error in a Rails app (doing a GET request for an image that doesn't exist:):
ActionController::RoutingError (No route matches [GET] "/assets/images/ui-bg_flat_75_ffffff_40x100.png"):
actionpack (3.2.12) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.12) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
...
It looks like a known error in jquery-ui.css
These sites talk about it:
jquery-ui.css images
Fixed jQuery UI CSS and image location to work with minified assets
And
Bug report
I have jquery-ui.css in my stylesheets folder. It is this version: /*! jQuery UI - v1.9.2 - 2012-11-23
Line 246 has:
url(images/ui-bg_flat_75_ffffff_40x100.png)
But, I don't know how to fix it.
Any help would be appreciated!
I believe you can resolve this by viewing your jquery-ui.css
and/or jquery-ui.theme.css
and finding the line that is pointing to and removing images
at the start so therefore it would look like this.
url(ui-bg_flat_75_ffffff_40x100.png)
instead of:
url(images/ui-bg_flat_75_ffffff_40x100.png)
Its looking at the wrong path therefore you will receive this error.
Rather than modifying the hardcoded url path, you'd be better looking at The Asset Pipeline Rails Guide (css and sass) and using one of the listed asset pipeline helpers.
That way, using the image-path("asset.png")
syntax, your referenced asset will always be correct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With