How can you display the hierarchy of 'require's that take place in a Ruby app?

Some files require files which require additional files.

However, by running an application in debug mode you only trigger a subset of required files - only the ones that are used by whatever subset of functionality your application is using at any given point in time.

How could you display a comprehensive hierarchy of all of the requires in an application as a tree?

Edit
Report