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?
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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.