palkan / anyway_config

Configuration library for Ruby gems and applications
MIT License
778 stars 52 forks source link

Configs are not loaded in production environment #58

Closed amkisko closed 4 years ago

amkisko commented 4 years ago

What did you do?

Run Rails and Sidekiq in production.

What did you expect to happen?

Eager loaded config classes.

What actually happened?

Classes are not loaded, Sidekiq jobs that use configs throw exceptions, Rails console in Sidekiq environment does not have classes loaded.

Additional context

This workaround helped:

config.eager_load_paths << Rails.root.join("config", "configs")

Environment

production

Ruby Version: 2.6.0

Framework Version (Rails, whatever): Rails 5.2.4.2

Anyway Config Version: 2.0.1

palkan commented 4 years ago

Thanks for the report. It seems I can reproduce this in tests (#59), so it's gonna be fixed soon)

palkan commented 4 years ago

Released a fix in 2.0.2. Check please.

amkisko commented 4 years ago

Thanks for super quick fix! :tada: