- Rake tasks are cached (thanks to turadb).
- If there is no Rakefile in the current directory, ancestor directories are searched in the way Rake itself does.
Copy the file to
/etc/bash_completion.d or possibly
/usr/share/bash-completion/completions or to another place where it is loaded when your Bash shell is started.