rvmsudo analog for python/virtualenv
One work around is to use "sudo -E". This will preserve the calling user's environment across the sudo. Note that if the adversary controls your environment this is an immediate root exploit (via LD_LIBRARY_PATH and similar).
As anyone who knows what virtualenv does for python there is an analog for ruby. What's interesting about the ruby installation is that there is a "rvmsudo" that projects the current rvm environment on the root/sudo user before executing the requested command.
virtualenv does not offer an obvious implementation of the same command.
Is there something I'm missing?