What is rack?

Your web server can parse a HTTP Request but does not understand what to do to fulfill that HTTP Request; OTOH Your application server(rails app) does not understand HTTP language. ‘rack’ acts as a translator to facilitate communication between these two entities. In other words, ‘rack’ is basically a specification of these two things: what the Web server should send to the app and what the app should return to the Web server;

  1. Read this excellent tutorial on rack. Just for newbies like me.
  2. Also watch this rails cast to understand countless possibilities of using rack.