Skip to content

config.enabled config not working #26

@MichalRemis

Description

@MichalRemis

I am using multiple development environments, but I found that rails_live_reload doesn't work in environments named other than "development". I have set the config in initializer:

config.enabled = Rails.env.development? || Rails.env.development_pl? || Rails.env.development_cz?

But it doesn't work. It's probably because initializers/rails_live_reload.rb is evaluated after rails_live_reload/engine.rb is loaded, where there is condition checking this (if RailsLiveReload.enabled? && defined?(::Rails::Server)...), which therefore doesn't use the config from intializer.

Is there please a way to make live reload work in environments other than 'development'?

I am using rails (6.1.4.1) and rails_live_reload (0.3.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions