RoutingError from css background image url


#1

In my css file, I have a css element that has a background image
that’s defined as

background: url(/images/global/tab-arrow.gif) no-repeat 16px 8px ;

This throws a Routing Error when an element with that class gets
rendered

ActionController::RoutingError (No route matches “/images/” with
{:domain=>“localhost”, :method=>:get, :subdomain=>nil,
:host=>“localhost”}):
/vendor/rails/actionpack/lib/action_controller/routing/
recognition_optimisation.rb:67:in `recognize_path’

It works fine when the image is copied into the public/images
directory but doesn’t like it when the image happens to be in a sub
directory. This looks like the Rails Routing is trying to treat this
url as a restful resource and I was wondering if anyone else has run
into this problem and how to go about resolving it.

Thanks in advance.

+s.park