Skip to content

Instantly share code, notes, and snippets.

@tizoc
Created April 2, 2012 17:07
Show Gist options
  • Save tizoc/2285193 to your computer and use it in GitHub Desktop.
Save tizoc/2285193 to your computer and use it in GitHub Desktop.
function mkgemsenv -d "Creates a gemset env in the current directory"
mkdir -p ".gemsenv/ENV"
echo (pwd)"/.gemsenv" > ".gemsenv/ENV/GEM_HOME"
echo (pwd)"/.gemsenv:"(gem env path) > ".gemsenv/ENV/GEM_PATH"
echo (pwd)"/.gemsenv/bin:"(sh -c 'echo $PATH') > ".gemsenv/ENV/PATH"
end
function usegemsenv -d "Starts a new shell using the gemset env in the current directory"
envdir .gemsenv/ENV $SHELL
end
function mkgemsenv -d "Creates a gemset env in the current directory"
mkdir ".gemsenv"
end
function usegemsenv -d "Starts a new shell using the gemset env in the current directory"
env GEM_HOME=(pwd)"/.gemsenv" GEM_PATH=(pwd)"/.gemsenv:"(gem env path) PATH=(pwd)"/.gemsenv/bin:"(sh -c 'echo $PATH') $SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment