From: Lucas Di Pentima Date: Wed, 22 May 2019 19:57:19 +0000 (-0300) Subject: 15258: Adds /lib to the eager_load paths. X-Git-Tag: 1.4.0~12^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/4837e08b7c338f4d25be24346c02c6cfb62aaccb 15258: Adds /lib to the eager_load paths. On rails 5.0 the autoload paths stopped working on production environments for thread safety concerns. See: https://github.com/rails/rails/commit/a71350cae0082193ad8c66d65ab62e8bb0b7853b Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/apps/workbench/config/application.rb b/apps/workbench/config/application.rb index 09fa403057..c8a722f0bf 100644 --- a/apps/workbench/config/application.rb +++ b/apps/workbench/config/application.rb @@ -27,7 +27,13 @@ module ArvadosWorkbench # Custom directories with classes and modules you want to be autoloadable. # config.autoload_paths += %W(#{config.root}/extras) - config.autoload_paths += %W(#{config.root}/lib) + + # Autoload paths shouldn't be used anymore since Rails 5.0 + # See #15258 and https://github.com/rails/rails/issues/13142#issuecomment-74586224 + config.eager_load_paths += %W(#{config.root}/lib) + + # Load entire application at startup. + config.eager_load = true # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named.