Forum: Ruby on Rails WebRick hangs up on simple .rhtml file

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.
1c46e952a61c99d9eae4f21037a088fd?d=identicon&s=25 anatol.pomozov (Guest)
on 2005-11-22 16:42
(Received via mailing list)
I don't know what is root of the problem that I have, probably somebody
could answer the question.

I have extremely simple rhtm file. See below

<% if (a.id <http://a.id>) { %>
<td width="27%"><span class="sidebox_arraw">&gt; </span><strong>
<%= link_to("Download", :controller => "attachment", :action =>
"download",
:id => a.id <http://a.id>) %>
</td>
<% } %>


And when I try to view the results of this rhtml Webrick hangs up. CPU
usage
100%. However Apache fcgi works fine for this template.
If I remove if {} condition then everything works fine. What is the
problem?? WebRick bug??

My environment: WinXP, ruby 1.8.2-14, rails 0.14.2
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 vanek (Guest)
on 2005-11-22 17:10
(Received via mailing list)
don't you want this instead:

<% if a.id %>
...
<% end %>

What you have looks more like C.


Anatol Pomozov wrote:

> <% } %>
>
>
> And when I try to view the results of this rhtml Webrick hangs up. CPU
> usage 100%. However Apache fcgi works fine for this template.
> If I remove if {} condition then everything works fine. What is the
> problem?? WebRick bug??
>
> My environment: WinXP, ruby 1.8.2-14, rails 0.14.2
...
This topic is locked and can not be replied to.