Last active
July 26, 2020 18:36
-
-
Save smapira/f0a46b802fc2ad823b68423e2ed74ef5 to your computer and use it in GitHub Desktop.
remove all gems.sh
This file contains 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
#!/usr/bin/env bash | |
# Execute script from URL | |
# curl -s https://gist.githubusercontent.com/smapira/f0a46b802fc2ad823b68423e2ed74ef5/raw | sh | |
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