Reputation: 2862
I’m having trouble hunting down where in a project a particular library is being require
-ed in.
Is there a method or technique that can tell me the filename and line?
Upvotes: 0
Views: 39
Reputation: 2301
Just off the top of my head, you could monkey patch require and print out __FILE__
and __LINE__
Upvotes: 0
Reputation: 24617
You didn't mention a system you are using but you can use grep
or ack-grep
for this task:
ack-grep "require 'simple_form'"
Upvotes: 1