Prodded by a tweet, here's how to serve a directory in one line of Ruby:

ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd).start'

Handy for sharing files at a conference, for example.

written by
Craig
published
2010-04-11
Disagree? Found a typo? Got a question? Email me at craig@barkingiguana.com.