Can Webrick show directory listings like Apache?

Hi,

I have a subdirectory of the RAILS_ROOT/public/ diretcory.

I can use Webrick to directly serve files from the public subdirectory:    http://<mysite>:3000/<mypubdir>/<mypubfile>

But I cannot get Webrick to show the directory listing of <mypubdir>. I get a 'Recognition failed' error.

Any ideas on how to make Webrick show public directoy listings like Apache?

Thanks,

David

hi,

server = WEBrick::HTTPServer.new Port: 8000, DocumentRoot: RAILS_ROOT

server.mount('/public', WEBrick::HTTPServlet::FileHandler, 
                        "RAILS_ROOT/public/", 
                        { :FancyIndexing => true })

I was also looking for this question. after digging though webrick source code and documentations found this solution.