How to uninstall all gems installed using `bundle install`

后端 未结 10 1952
情歌与酒
情歌与酒 2020-12-23 17:09

How can I remove all the gems installed using bundle install in a particular RoR project. I don\'t want to uninstall gems that are used by other projects.

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-23 17:46

    If your problem is similar to mine, then you want to uninstall all gems that were installed while testing GemFile changes, in that case I simply used:

    bundle clean
    

    That uninstalled all the gems that are not specified in the GemFile and GemFile.lock.

    I have not tested it but I suppose you could delete all lines from your Gemfile and run the above command to get rid of all the gems installed by the ROR project in the current directory.

提交回复
热议问题