Skip to content

Do not reload the app after a file required during initialization is changed #720

@GCorbel

Description

@GCorbel

During the initialization of a Rails app, some files are required and added to $LOADED_FEATURES so, when they are changed, the whole app reloads.

I want to avoid that and I this commenting the line that add them to the watcher fix my issue.

Is there a proper way to do that ? I don't understand at which step Spring::Application#preload is called but maybe it's a good idea to watch only files loaded before Rails.application.config.after_initialize or Rails.application.config.to_preload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions