WebRick hangs up on simple .rhtml file


#1

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) { %>

> <%= link_to("Download", :controller => "attachment", :action => "download", :id => a.id ) %> <% } %>

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


#2

don’t you want this instead:

<% if a.id %>

<% end %>

What you have looks more like C.

Anatol P. 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