Just to add a simplistic explanation of Rack (as I feel that is missing):
Rack is basically a way in which a web app can communicate with a web server. The communication goes like this:
- The web server tells the app about the environment- this contains mainly what the user sent in as his request - the url, the headers, whether it's a GET or a POST, etc.
- The web app responds with three things: 
- the statuscode which will be something like200when everything went OK and above400when something went wrong.
- the headerswhich is information web browsers can use like information on how long to hold on to the webpage in their cache and other stuff.
- the bodywhich is the actual webpage you see in the browser.
 
These two steps more or less can define the whole process by which web apps work.
So a very simple Rack app could look like this:
class MyApp
  def call(environment) # this method has to be named call
    [200, # the status code
     {"Content-Type" => "text/plain", "Content-length" => "11" }, # headers
     ["Hello world"]] # the body
  end
end
# presuming you have rack & webrick
if $0 == __FILE__
  require 'rack'
  Rack::Handler::WEBrick.run MyApp.new
end