Delete the 'Cleaning all the gems on your system is dangerous!' message on bundler install

Viewed 1358

I would like to know if it's possible to remove the following message on bundler install commands:

Cleaning all the gems on your system is dangerous! If you're sure you want to remove every system gem not in this bundle, run bundle clean --force.

From what I understood, this message is supposed to be displayed bundler clean, so I don't understand why it would be here. Could it be that it is due to that time I used bundler install --clean?

Thank you in advance. Have a nice day.

P.S.: Please warn me if the question should be on another OverFlow website, or with other tags.

2 Answers

The warning is due to bundler trying to run bundle clean after each install or update.

bundler config clean false and bundler config --local clean false should be able to disable those attempts, leading to the suppression of the warning.

P.S.: I do not know if that could create problems, as it is not simply suppressing an useless warning, so I won't mark this answer as the selected answer for now, to avoid misleading people with the same problem.

The solution for me was to delete the .bundle/config which contained BUNDLE_CLEAN: "true". The reference of the original comment in GitHub can be found here

Related