If you are working with Merb or DM you know that approximately a gazillion gems are involved. When, for whatever reason, I want to remove them it is a pain to do by hand.
Here is a simple script to help:
#!/bin/bashprefix=$1gem list --local | grep $prefix | awk '{ print $1 }' | xargs sudo gem uninstallI saved mine as remove_gem_by_prefix, gave it executable permissions and placed it in my path.
Now I can issue the commands:
$ remove_gem_by_prefix merbor
$ remove_gem_by_prefix dmAnd they all get blasted. You do need to be careful to make sure the prefix you provide is unique to the gems you wish to remove.
0 comments:
Post a Comment