Get Unused Routes of Large Rails App πŸ› 

Get Unused Routes of Large Rails App :hammer_and_wrench:

After a few years of continuous development, your rails application becomes larger and it’s good practice to do some cleanup. One of the most obvious cleanups is cleaning up unused routes.

This is the error I get, even after prepending the script with
Rails.initialize

Traceback (most recent call last):
get-unused-routes.rb:1:in `’: uninitialized constant Rails (NameError)

Hi @TommyCon99

Please execute following line to get rid of the error you’re getting -

Rails.application.eager_load!