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

ruby -rwebrick -e' => 3000, :DocumentRoot => Dir.pwd).start'

Handy for sharing files at a conference, for example.

written by
Disagree? Found a typo? Got a question?
If you'd like to have a conversation about this post, email I don't bite.
You can verify that I've written this post by following the verification instructions:
curl -LO
curl -LO
gpg --verify a-one-line-web-server-in-ruby.html.orig{.asc,}