I use a function that looks like this:
find $1 -name $2 | xargs egrep -nC3 $3 | less
So, say: find ./ -name "*.rb" | xargs egrep -nC3 'gsub' | less
You'll get the matching line, three lines before and three lines after, as well as file name and line numbers.