The Rack gem provides the infrastructure code that you can use to build your own web application, web framework, or middleware. It allows to quickly prototype or build stuff without doing the same repetitive tasks again and again.

Here are some helpers you can use with Rack:

The rack-contrib project on Github contains a library of these middleware components. Take a look; you will definitely find something useful.