Skip to content

Instantly share code, notes, and snippets.

@ymsrk
Created January 17, 2018 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymsrk/cd898994e35db64e1f28058cb6ec1731 to your computer and use it in GitHub Desktop.
Save ymsrk/cd898994e35db64e1f28058cb6ec1731 to your computer and use it in GitHub Desktop.
all uninstall gems
#!/usr/bin/env bash
echo 'uninstall_gems'
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
#rbenv versions --bare
RBENVPATH=`rbenv root`
echo $RBENVPATH
RUBIES=`ls $RBENVPATH/versions`
for ruby in $RUBIES; do
echo '---------------------------------------'
echo $ruby
rbenv local $ruby
uninstall
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment