From 5f3ab734fc45d541aaaccb05b59cd95aa49fe8ef Mon Sep 17 00:00:00 2001 From: Mark Abramov Date: Thu, 21 Jul 2016 22:52:02 +0300 Subject: [PATCH] Redirect STDERR to /dev/null during eager_preload --- lib/spring/application.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/spring/application.rb b/lib/spring/application.rb index c9fa4bab..4ba9f238 100644 --- a/lib/spring/application.rb +++ b/lib/spring/application.rb @@ -115,7 +115,12 @@ def preload end def eager_preload - with_pty { preload } + with_pty do + # we can't see stderr and there could be issues when it's overflown + # see https://github.com/rails/spring/issues/396 + STDERR.reopen("/dev/null") + preload + end end def run