diff --git a/config/environments/development.rb b/config/environments/development.rb index f9ed1eb16..0051d171d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -22,4 +22,18 @@ Diaspora::Application.configure do config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log #config.threadsafe! + + # Monkeypatch around the nasty "2.5MB exception page" issue, caused by very large environment vars + # This snippet via: http://stackoverflow.com/questions/3114993/exception-pages-in-development-mode-take-upwards-of-15-30-seconds-to-render-why + # Relevant Rails ticket: https://rails.lighthouseapp.com/projects/8994/tickets/5027-_request_and_responseerb-and-diagnosticserb-take-an-increasingly-long-time-to-render-in-development-with-multiple-show-tables-calls + config.after_initialize do + module SmallInspect + def inspect + "<#{self.class.name} - tooooo long>" + end + end + [ActionController::Base, ActionDispatch::RemoteIp::RemoteIpGetter, OmniAuth::Strategy, Warden::Proxy].each do |klazz| + klazz.send(:include, SmallInspect) + end + end end