Make dependencies.rb add a name to NameError

In order to use `.name` on #15762, we need to be consistent and set it when we raise an error on Depdencies module.
review @tenderlove @matthewd @fxn