What code runs when you request a page from a Ruby on Rails application?
Here is an annotated trace showing every method call within Rails and its dependencies. It is for an example application that loads a blog post from the database and renders a page containing the post's title.
Rack is an interface that says how web servers can talk to web applications like Rails. It also allows Rack Middlewares to be used to perform actions based on the request such as caching, logging or modifying HTTP headers.
An example of one of the many middlewares that Rails uses is Rack::Sendfile. This helps serve files from disk efficiently by making use of the