1000 times this... it is exactly like ack-grep but faster :)
ack --java "foo"
while with ag you write: ag -G"\.java$" "foo"
But yes, ack and ag feel pretty identical except for the speed. Most of the time the speed improvement is irrelevant to me, except sometimes now I'll use ag in my home folder, and it's still fairly snappy.(I've never needed to use the rackup "rack" command directly, fortunately, if you do you ought to use a different alias)
Or escape alias \rack
(Presumably because in zsh, `which which` says it's a shell built-in, whereas in bash it finds `/usr/bin/which`, so bash doesn't seem to be caring about your aliases.)
That's not a knock on ag at all, and if ag fits your needs, then by all means use it.