How to uninstall all ruby gems on windows?

前端 未结 4 1945
醉话见心
醉话见心 2021-01-31 18:24

How to uninstall all ruby gems on Windows? Is it possible with single command?

4条回答
  •  醉话见心
    2021-01-31 19:08

    Using gem env on your console will provide something like this:

      - GEM PATHS:
        - C:/Users/Luis/Tools/ruby/ruby-1.8.7-p334-i386-mingw32/lib/ruby/gems/1.8
    

    If you browse using Explorer into that directory will find a series of folders that represent all the installed gems (cache, doc, spec, gems)

    Remove all of them and it will remove all your gems.

    Now, this will not remove any executable script installed by one of these gems. If you installed rake or rails gems, these scripts (as rails and rails.bat will remain in your Ruby bin directory.

    You will also need to remove them manually.

提交回复
热议问题