Web edit and HTTPS push work if multiple Rubies installed v3

Would fail because Git modifies the hooks PATH, so for example
the at /usr/bin/ruby could be called instead of the correct one
at /usr/local/bin/ruby. Same for RVM.

Updates the reversed https://github.com/gitlabhq/gitlabhq/pull/8340

The new approach is to generate a file to be sourced with the PATH for gitlab shell.