Forum: Ruby on Rails Routing problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
170b5dc385cc9ddf78ed01bcf1e6990a?d=identicon&s=25 Nas (Guest)
on 2006-04-27 09:38
Hi,

I am having a routing problem and can't figure out why its happing. I
have added the following line in my routing.rb file.

map.connect 'name/:id', :controller => 'controller_name', :action =>
'action_name'

When I use http://domain.com/controller_name/action_name/id then it
works fine on the local machine using webrick as well as on a live site
using apache. But when I use http://domain.com/name/id then it crashes
the webrick on local machine and gives the regular "Application error"
on the live server using apache. However, in case of Apache it starts
working again if I refresh my browser.

Any help on how to sort this will be very much appreciated.


Thanks in advance.



Nas
170b5dc385cc9ddf78ed01bcf1e6990a?d=identicon&s=25 Nas (Guest)
on 2006-04-27 10:20
Nas wrote:
> Hi,
>
> I am having a routing problem and can't figure out why its happing. I
> have added the following line in my routing.rb file.
>
> map.connect 'name/:id', :controller => 'controller_name', :action =>
> 'action_name'
>
> When I use http://domain.com/controller_name/action_name/id then it
> works fine on the local machine using webrick as well as on a live site
> using apache. But when I use http://domain.com/name/id then it crashes
> the webrick on local machine and gives the regular "Application error"
> on the live server using apache. However, in case of Apache it starts
> working again if I refresh my browser.
>
> Any help on how to sort this will be very much appreciated.
>
>
> Thanks in advance.
>
>
>
> Nas



Sorted, in the map.connect 'name/:id', :controller => 'controller_name',
:action => 'action_name I was using "profile/:id" for name/:id and when
I changed profile to something else then it worked...don't know the
reason yet.
This topic is locked and can not be replied to.