Skip to content

Instantly share code, notes, and snippets.

@mrrooijen
Created April 3, 2012 10:29
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mrrooijen/2290928 to your computer and use it in GitHub Desktop.
Save mrrooijen/2290928 to your computer and use it in GitHub Desktop.
A little shell function that allows you to perform rbenv (gem) commands with sudo privileges. Similar to rvmsudo.
function rbenvsudo(){
executable=$1
shift 1
sudo $(rbenv which $executable) $*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment