How to uninstall all gems installed using `bundle install`

后端 未结 10 1937
情歌与酒
情歌与酒 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 18:08

    There's no one simple way to remove all gems - let alone removing those within a specific bundle. You could try some of these suggestions: Uninstall all installed gems, in OSX?

    Adapt to the bundle show command instead of gem list


    For the future, try this approach:

    If you install your bundle locally like the example below, the gems won't be installed in your global gem directory. Then you can easily delete the installation folder to delete all gems of the bundle.

    # install gems to project_root/vendor/bundle
    bundle install --path vendor/bundle --without test
    

    The path option is saved to .bundle/config just like all others and any subsequent bundle install calls will use it unless you set it to something else or remove it from the config!

提交回复
热议问题