title: How to execute simple Ruby on a local WebServer
body: <p>I'm using WEBrick to start a local server on port 2000 and trying to execute Ruby with ERB. (I have Ruby 1.9.2 installed on my OS X box). It doesn't seems to work.</p>
  
  <p>For example, I created an erb file (tryErb.erb) like this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;try erb&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p&gt; % 99.downto(96) do |number|
      &lt;%= number %&gt; bottles of beer…
      % end
      &lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I used <code>chmod a=rwx tryErb.erb</code> to make the file executable, but if I try to visit the proper URL (http://localhost:2000/tryErb.erb), nothing seems to work. The browser doesn't go anywhere; it simply stays on the root's index. 
  The log in the bash shell shows: </p>
  
  <blockquote>
    <p>localhost - - [12/May/2011:10:12:05
    CEST] "GET /tryErb.erb HTTP/1.1" 200
    199 <a href="http://localhost:2000/" rel="nofollow">http://localhost:2000/</a> ->
    /tryErb.erb</p>
  </blockquote>
  
  <p>Any ideas?</p>