Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在寻找特定库在项目中的哪个位置时遇到了麻烦require。
require
有没有可以告诉我文件名和行的方法或技术?
您没有提到您正在使用的系统,但您可以使用greporack-grep来完成此任务:
grep
ack-grep
ack-grep "require 'simple_form'"
Just off the top of my head, you could monkey patch require and print out __FILE__ and __LINE__
__FILE__
__LINE__