Rack is a minimalistic web application interface sitting in the background of your favorite Ruby web framework. This post introduces Rack and shows how to implement a minimal stand-alone ‘Hello World’ application.
Introduction to Rack
Rack is a minimal framework for web applications. Build on top of libraries like Net::HTTP, it defines domain objects such as path, requests, params, responses, cookies and sessions. In short, it handles many low-level details and encapsulates them in easy-to-use objects. Rack has evolved from a standalone application to an interface for major Ruby web frameworks like Rails, Merb, Ramaze, Sinatra and Camping are supported. Once you understand the Rack interface, It allows you two distinct usages. First, any Rack compatible application can be combined with other applications through a central configuration file. Second, some applications can be used as middlewares - code pieces filtering request and applying specific modifications or messaging of these requests.
Read more at http://blog.sebastianguenther.org/2010/03/01/introduction-to-ruby-rack/