# Newbie routing problem

**URL:** <https://www.ruby-forum.com/t/newbie-routing-problem/90406>\
**Category:** Rails\
**Created:** [March 28, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/newbie-routing-problem/90406 "2007-03-28T14:20:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brijnaald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f14d63/32.png) [@brijnaald](https://www.ruby-forum.com/u/brijnaald)\
**Post date:** [March 28, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/newbie-routing-problem/90406/1 "2007-03-28T14:20:51Z")

</div>

Hi, I have a (hopefully) simple problem that just doesn’t want to work:

I have a mapping in my routes.rb file:

map.connect ‘images/theme/:filename’,  
:controller =\> ‘theme’, :action =\> ‘images’

If I then go to url: [http://localhost:3000/images/theme/bullet\_blue.jpg](http://localhost:3000/images/theme/bullet_blue.jpg)

I get following error:

Routing Error  
no route found to match “/images/theme/bullet\_blue.jpg” with  
{:method=\>:get}

However, if I go to url:  
[http://localhost:3000/images/theme/bullet\_blue](http://localhost:3000/images/theme/bullet_blue), the action is executed  
correctly.

Why does the mapping not correspond to a real filename containing an  
extension?

thanks!

---

<div class="post-metadata">

**Author:** ![brijnaald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f14d63/32.png) [@brijnaald](https://www.ruby-forum.com/u/brijnaald)\
**Post date:** [March 28, 2007, 5:12pm UTC](https://www.ruby-forum.com/t/newbie-routing-problem/90406/2 "2007-03-28T17:12:17Z")

</div>

Does

map.connect ‘images/theme/:filename.:format’, :controller =\> ‘theme’,  
:action =\> ‘images’

work? You might have to play around with that dot and the :format  
reference  
but I think that’s how it’s done. I’ve never used it myself though.  
Someone  
else with some experience might want to clarify.

RSL
