Created
April 2, 2012 17:07
-
-
Save tizoc/2285193 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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