the minimal Ruby equivalent would be
ruby -run -ehttpd .
Here's a handy snippet for bashrc: function S {
ruby -run -ehttpd . -p${1-8080} # default to port 8080 unless given as parameter
}