palkan / anyway_config

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

Hash#deep_merge! breaks Rails initialization #89

Closed dcrec1 closed 2 years ago

dcrec1 commented 3 years ago

What did you do?

Tried to configure Yabeda Puma:

https://github.com/yabeda-rb/yabeda-puma-plugin#usage

What did you expect to happen?

Rails starting.

What actually happened?

Rails hangs when running initializers:

https://github.com/rails/rails/blob/main/railties/lib/rails/initializable.rb#L61

Additional context

Downgrading anyway to 2.1.0 fixes the problem because the problem is caused by this code:

https://github.com/palkan/anyway_config/blob/master/lib/anyway/ext/hash.rb#L30

Also, commenting the #deep_merge! also fixes the initialization.

Environment

Ruby Version:

3.0.1

Framework Version (Rails, whatever):

Rails 6.1.4

Anyway Config Version:

Fails with the latest version, is ok with 2.1.0

palkan commented 3 years ago

Thanks for the report! Will take a look ASAP.

palkan commented 3 years ago

Please, try v2.2.2; should be fixed now.