Skip to content

Commit

Permalink
Avoid require memory leak with pathnames in load path (#1257)
Browse files Browse the repository at this point in the history
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Same problem found here: lobsters/lobsters#449
and
opf/openproject#6148
  • Loading branch information
jrafanie authored and stevecrozz committed Feb 13, 2018
1 parent 9b85558 commit 67aeeb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/application.rb
Expand Up @@ -16,7 +16,7 @@ class Application < Rails::Application
# -- all .rb files in that directory are automatically loaded.

# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += [Rails.root.join('lib')]
config.autoload_paths << Rails.root.join('lib').to_s

config.before_initialize do
config.secret_key_base = Errbit::Config.secret_key_base
Expand Down

0 comments on commit 67aeeb9

Please sign in to comment.