Last active
January 25, 2018 21:04
-
-
Save thelemonyfresh/ef520edea57d4badfb5469d0c115c9e7 to your computer and use it in GitHub Desktop.
Print file names as rails app loads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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