From bb6ce66bfecfaea3f2b16b32c48d63bf5617d98e Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 10 Nov 2021 21:32:31 -0600 Subject: [PATCH] gems: don't load `listen` and `solargraph` in test mode. Only load the `listen` and `solargraph` gems in the development environment, not the test environment. The `listen` gem automatically spawns background threads to listen for file changes, in order to automatically reload code when files change, which we don't want or need in test mode. These threads can interfere with sandboxing, because they prevent us from being able to call unshare(2) (which can only be called from a single-threaded process). --- Gemfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gemfile b/Gemfile index b8e23eda6..c8c1e3a9a 100644 --- a/Gemfile +++ b/Gemfile @@ -67,9 +67,6 @@ group :development do gem 'better_errors' gem 'binding_of_caller' gem 'benchmark-ips', require: "benchmark/ips" -end - -group :development, :test do gem 'listen' gem 'solargraph' end