Forum: Ruby on Rails RoutingError from css background image url

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
sparky (Guest)
on 2008-10-18 00:07
(Received via mailing list)
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

ActionController::RoutingError (No route matches "/images/" with
{:domain=>"localhost", :method=>:get, :subdomain=>nil,
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.

This topic is locked and can not be replied to.