From 0340a9a4b07dd4554e19519d558546e19f999861 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 6d23d8f..98ff4fc 100644 --- a/lib/spring/application.rb +++ b/lib/spring/application.rb @@ -129,7 +129,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