You could configure Apache (for example) to run .rb files as CGI scripts, and then add a shebang line (#!/path/to/your/ruby or maybe #!/usr/bin/env ruby) at the top of the script. It's not optimal, though, as it'd start a new interpreter for each request.