Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
665 views
in Technique[技术] by (71.8m points)

ruby on rails - How to find unused gems in my Gemfile

How to find unused gems in my Gemfile, so that I can cleanup references which are no longer used.

question from:https://stackoverflow.com/questions/14333963/how-to-find-unused-gems-in-my-gemfile

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I doubt if there is an automated way to find unused gems in the Gemfile.

For someone who has built the application over time, it should be easy to manually identify gems that were discarded along the way for some reason or the other.

For a legacy application inherited from someone else, it is a much difficult task to manually identify unused gems. If there is comprehensive test coverage for the system, it would help in removing unused gems by trial and error, while ensuring that the tests pass at each change in the Gemfile.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...