From: Belorion Date: 2005-01-13T01:06:02+09:00 Subject: Webrick, erb, and .rhtml I am trying to get a basic Webrick server running to serve up .rhtml files on a WinXP machine. I saw that you need to install erb to get this to work (BTW, the erb link on the Webrick site is broken), so I installed erb 2.0.4. I startup a Webrick server using: #!/usr/local/bin/ruby require 'webrick' include WEBrick s = HTTPServer.new( :Port=> 2000 ) ## mount subdirectories s.mount("/~test", HTTPServlet::FileHandler, "c:\\documents and settings\\user\\desktop\\test", true) #<= allow to show directory index. trap("INT"){ s.shutdown } s.start Serving up html works fine. However, serving up .rhtml does not work. If I visit my test.rhtml, whose contents are: testing, 1234 <% 10.times{ |i| puts i } %> All I get as output on my browser is "testing, 1234", whose source looks like testing, 1234 At the command prompt, if I ruby "erb test.rhtml" I get: 0 1 2 3 4 5 6 7 8 9 testing, 1234 Which is obviously incorrect. What am I doing wrong here? I am using ruby 1.8.2 (2004-07-29), and erb 2.0.4.