rails bundle clean

前端 未结 8 486
庸人自扰
庸人自扰 2020-12-02 16:27

After updating a bundle, you will have some gems that may be obsolete -- since a newer version of that gem has been installed. There is no such command under the bundl

8条回答
  •  無奈伤痛
    2020-12-02 16:46

    If you are using Bundler 1.1 or later you can use bundle clean, just as you imagined you could. This is redundant if you're using bundle install --path (Bundler manages the location you specified with --path, so takes responsibility for removing outdated gems), but if you've used Bundler to install the gems as system gems then bundle clean --force will delete any system gems not required by your Gemfile. Blindingly obvious caveat: don't do this if you have other apps that rely on system gems that aren't in your Gemfile!

    Pat Shaughnessy has a good description of bundle clean and other new additions in bundler 1.1.

提交回复
热议问题