41he7a
Last Updated: February 25, 2016
·
867
· shell
Avatar3

Rvmrcify

Zsh function to create .rvmrc file with gemset name of current directory

function rvmrcify {
dir=basename $PWD
echo "rvm use --create 1.9.3@$dir" > .rvmrc
}

Say Thanks
Respond

1 Response
Add your response

228
6dc2fd642323cb9bab9a050710290353
function rvmrcify {
  dir=`basename $PWD`
  ruby_version=1.9.3
  if [ $# -ne 0 ]
  then
    ruby_version=$1
  fi
  echo "rvm use --create $ruby_version@$dir" > .rvmrc
  source .rvmrc 
}

Give a user ability to select which ruby version to use ;-)

over 1 year ago ·