Skip to content

Instantly share code, notes, and snippets.

@alex-zige
Created April 23, 2013 10:48
Show Gist options
  • Save alex-zige/5442604 to your computer and use it in GitHub Desktop.
Save alex-zige/5442604 to your computer and use it in GitHub Desktop.
to switch ruby version & gemset & project dir & fire zeus and sublime
#!/bin/bash --login -fp alex

# IMPORTANT: Source RVM as a function into local environment.
#            Otherwise switching gemsets won't work.

if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then

  source "$HOME/.rvm/scripts/rvm"

elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then

  source "/usr/local/rvm/scripts/rvm"

else

  printf "ERROR: An RVM installation was not found.\n"

fi

echo "swtich to ruby 1.9.3 patch 327 falcon with gemset drinkbuddy"
 rvm use 1.9.3-p327@drinkbuddy

echo "swtich project root"
cd /goalpost-drink

subl .

echo "clean out the zeus session"
rm .zeus.sock

echo "start the zeus sever"
zeus start

Save it to /drinkbuddy path

To run . drinkbuddy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment