Last Updated: February 25, 2016
·
943
· dfang

[killer tips]Search code in all bundled gems

sometimes when you're hacking source code in a rails project, you may wonder where a method is defined or something else, you can use grep/ack/ag with bundle show --paths, this can save you a lot of time, you don't need to guess ....

example use:

ag 'def confirmation_instructions' # search in current project source code

ag 'def confirmation_instructions' `bundle show --paths` # search in bundled gems

2 Responses
Add your response

Should be bundle show --paths I think, not bundler

over 1 year ago ·

@bonsaiben, yes, mistype, corrected, thanks !

over 1 year ago ·