The ease of PHP with the power of Ruby
#!/usr/bin/ruby require 'rubyhp' __END__ <html> <body> <% cgi.params.each do |key, value| %> <%= key %>: <%= value %><br /> <% end %> <% if cgi.params.empty? %> Sorry, please enter some cgi parameters. How about "?foo=baz"? <% end %> </body> </html>
Christopher Cyll has put together a great little example of how to quickly create templated Web pages with Ruby without requiring any frameworks. It relies on CGI, but sometimes that's all you need, and it makes throwing together tiny Ruby-powered Web pages possible as easy as creating a simple PHP page.