# Routes.rb

**URL:** <https://www.ruby-forum.com/t/routes-rb/124075>\
**Category:** Rails\
**Created:** [December 24, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/routes-rb/124075 "2007-12-24T12:00:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![milazzo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@milazzo](https://www.ruby-forum.com/u/milazzo)\
**Post date:** [December 24, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/routes-rb/124075/1 "2007-12-24T12:00:32Z")

</div>

Greetings,

I’ve just updated to Rails 2 and have rebuilt on of my apps, but I’m  
having a headache with the paths. Please can someone explain to me what  
I need to do.

The path is simple:

[http://localhost:3000/home/en](http://localhost:3000/home/en)

which worked before, but now throws a 404 error.

In my routes.rb file I have:

map.connect “”, :controller=\>“g\_pub”, :action=\>“index”,  
:path=\>[“home”,“en”]

for some reason it’s splitting up the path incorrectly. If I look at the  
SQL that gets generated I see:

g\_blocks.name=‘en’ AND g\_blocks.location = ‘/home/’ AND  
g\_published\_blocks.g\_language\_id=NULL

whereas what I really need is:

g\_blocks.name=‘home’ AND g\_blocks.location = ‘/’ AND  
g\_published\_blocks.g\_language\_id=‘en’

In other words, I need the following values:

g\_blocks.location → /  
g\_blocks.name → home  
g\_blocks.g\_language\_id → en

but what I’m getting at the moment is:

g\_blocks.location → /home/  
g\_blocks.name → en  
g\_blocks.g\_language\_id → NULL

Can anyone see what I need to do? Many thanks.
