# No route matches for stylesheets

**URL:** <https://www.ruby-forum.com/t/no-route-matches-for-stylesheets/171240>\
**Category:** Rails\
**Created:** [June 29, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/no-route-matches-for-stylesheets/171240 "2009-06-29T13:19:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![on9west](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/6f9a4e/32.png) [@on9west](https://www.ruby-forum.com/u/on9west)\
**Post date:** [June 29, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/no-route-matches-for-stylesheets/171240/1 "2009-06-29T13:19:17Z")

</div>

Dear all

Why the following error appear in development.log?

Processing ApplicationController#index (for 160.1.42.69 at 2009-06-29  
19:09:05) [GET]

ActionController::RoutingError (No route matches  
“/stylesheets/images/img02.gif” with {:method=\>:get}):  
/appl/lis/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/routing/recognition\_optimisation.rb:66:in  
`recognize_path' /appl/lis/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:386:in`recognize’  
/appl/lis/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:182:in  
`handle_request' /appl/lis/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in`dispatch\_unlocked’

Below is part of my css file, it is no problem to display the img02.gif  
in my browser  
#menu {  
float: left;  
width: 100%;  
height: 40px;  
margin: 0 auto;  
background: #4E8CFF url(images/img02.gif) no-repeat;  
}

FYI, my route.rb  
map.connect ‘:controller/:action.:format’  
map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’

It is so strange…

Please kindly help. Thank you very much

Valentino

---

<div class="post-metadata">

**Author:** ![on9west](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/6f9a4e/32.png) [@on9west](https://www.ruby-forum.com/u/on9west)\
**Post date:** [June 29, 2009, 2:40pm UTC](https://www.ruby-forum.com/t/no-route-matches-for-stylesheets/171240/2 "2009-06-29T14:40:34Z")

</div>

use an absolute path for the image file. I think you can use /images/  
img02.gif.

On Jun 29, 4:19 pm, Valentino L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![on9west](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/6f9a4e/32.png) [@on9west](https://www.ruby-forum.com/u/on9west)\
**Post date:** [June 29, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/no-route-matches-for-stylesheets/171240/3 "2009-06-29T14:44:13Z")

</div>

Valentino L. wrote:

> ```
> background: #4E8CFF url(images/img02.gif) no-repeat;
> 
> ```

i think you correct with url(…/images/img02.gif)
