# WebRick hangs up on simple .rhtml file

**URL:** <https://www.ruby-forum.com/t/webrick-hangs-up-on-simple-rhtml-file/48600>\
**Category:** Rails\
**Created:** [November 22, 2005, 4:42pm UTC](https://www.ruby-forum.com/t/webrick-hangs-up-on-simple-rhtml-file/48600 "2005-11-22T16:42:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anatol.pomozov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anatol.pomozov](https://www.ruby-forum.com/u/anatol.pomozov)\
**Post date:** [November 22, 2005, 4:42pm UTC](https://www.ruby-forum.com/t/webrick-hangs-up-on-simple-rhtml-file/48600/1 "2005-11-22T16:42:09Z")

</div>

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](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**

---

<div class="post-metadata">

**Author:** ![anatol.pomozov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@anatol.pomozov](https://www.ruby-forum.com/u/anatol.pomozov)\
**Post date:** [November 22, 2005, 5:10pm UTC](https://www.ruby-forum.com/t/webrick-hangs-up-on-simple-rhtml-file/48600/2 "2005-11-22T17:10:19Z")

</div>

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  
> …
