Forum: Ruby on Rails Url rewriting problem with rails 1.2.3

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.
A40925a43d6295473e61358455e52965?d=identicon&s=25 Hans Zietsman (hansdons)
on 2007-03-29 20:56
(Received via mailing list)
Very frustrated. I recently upgraded from earlier Rails version to new
one (1.2.3). On the new version Rails (or webrick, not sure) messes up
or rewrites incorrecly a url provided by javascript:

I have a simple piece of javascript, firing on an image click that
loads a document in an i frame. The url navigation code is simply:
window.location.href = "http://localhost:3000/login/messages" .
(machine name:port name is variable of course) Rails then (used to for
last 6 months)
call the 'messages' method on the 'login' controller, which then 'does
its thing'. Always worked perfectly. No matter how many times I click
the relevant image the same controller method 'messages' is called and
everything works perfectly. Now Rails(version 1.2.3) somehow generates
the following url: "http://localhost:3000/login/login/messages" which
results in rails thinking 'messages' is an id an 'login' a controller
method. From the javascript I definitely DO NOT give it this url + I
do not do anything further with it- including the server side. Just
before the 'window.location.href =' part, I use an alert to check the
url and it is correct. So this is my problem. I also discovered that
if I click it again, the login part is appended again, i.e it becomes
"http://localhost:3000/login/login/login/messages". The exact same
code that works previously does not now. The only problem is the fact
that, without my intervention a url becomes something else. I know it
is not a browser issue.
So if anyone can help, it would be great. It would also be useful for
me to find webrick's log file. Where is it stored on windows?
A40925a43d6295473e61358455e52965?d=identicon&s=25 Hans Zietsman (hansdons)
on 2007-03-29 21:26
(Received via mailing list)
I solved the problem: the url generated by javascript was "login/
messages" instead of "/login/messages" . (the machine_name and
portname was left out). The older version of Rails was just more
This topic is locked and can not be replied to.