Skip to content

Instantly share code, notes, and snippets.

@thelemonyfresh
Last active January 25, 2018 21:04
Show Gist options
  • Save thelemonyfresh/ef520edea57d4badfb5469d0c115c9e7 to your computer and use it in GitHub Desktop.
Save thelemonyfresh/ef520edea57d4badfb5469d0c115c9e7 to your computer and use it in GitHub Desktop.
Print file names as rails app loads
# bin/rails
#
# drop the following into bin/rails to list files as they load -- useful for tracking down order dependency issues
files = []
tp = TracePoint.new(:line) do |tp|
if tp.path =~ /<repository_name>/
unless files.include? tp.path
puts "#{tp.path}".inspect
files.push(tp.path)
end
end
end
tp.enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment