Reloading rails middleware without restarting the server in development
I have a rails 4 app with middleware located at lib/some/middleware.rb which is currently injected into the stack though an initializer like so: MyApp::Application.configure.do |config| config.middleware.use 'Some::Middleware' end Unfortunately, any time I change something I need to restart the server. How can I reload it on each request in development mode? I've seen similar questions about reloading lib code with either autoloading or wrapping code in a to_prepare block but I'm unsure how that could be applied in this scenario. Thanks, - FJM Update #1 If I try to delete the middleware and