How to remove installed ri and rdoc?

前端 未结 3 1842
情深已故
情深已故 2020-12-12 14:13

How can I remove the ri and rdoc of installed gems? Thanks

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 14:43

    I just had this problem to, after thinking it would be a good idea to have some local rdoc for the train etc, I completely filled up my disc!

    So, I bit the bullet, and did it (the hard way).

    First, this is how I got in this stupid predicament :-

    $ gem install rdoc-data
    $ rdoc-data --install
    $ gem rdoc --all --overwrite
    

    To undo this, I thought I'd uninstall the gems, and then install them as needed (but without rdoc!)

    1. Get list :-

      $ gem list
      
      *** LOCAL GEMS ***
      
      aasm (2.1.1)
      actionmailer (3.2.3, 3.2.2, 3.1.4, 3.1.3, 3.1.1, 3.1.0, 2.3.8, 2.3.5)
      actionpack (3.2.3, 3.2.2, 3.1.4, 3.1.3, 3.1.1, 3.1.0, 2.3.8, 2.3.5)
      active_support (3.0.0)
      ... +100 ...
      
    2. Copy and search/replace \(.*\) with '\'

    3. Bulk uninstall :-

      $ gem uninstall actionmailer \
      actionpack \
      active_support \
      ... 100 more ...
      ZenTest \
      -a -x -I
      
    4. Watch as the disc gains GB's of free space! (~11GB!)

    Twas a stupid idea in the first place, and my solution may be just as much so, but it worked.

提交回复
热议问题