How to see the order of script execution and file access throughout a Rails app lifecycle?

While starting off in Rails it’s a daunting task to connect all of the
proverbial dots from when the server starts to each request to the
server in terms of what files / scripts are being executed and in the
execution flow.

I was thinking about putting “if env is development, print the
filename” into each script in my app, however I starting thinking that
adding this functionality into a base class may be more effective…
or perhaps there are other options?

I’d be very grateful if someone could help me to understand how to
properly implement something to this effect where I’d end up getting a
holistic view of all files (scripts) in the order that they’re
accessed and then on each request, a nice little hierarchy of files
that were processed to reply to that request.

Thanks much,