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.
SQLite3::Statement#each is the last Ruby method called before the SQL query is run against the database. This calls C-code in the SQLite3 Ruby gem and in the SQLite engine to run the query (not shown here).