I'm using it that way; after a lot of hard coded constants in service objects definition I just realize the reason why dependency injection is a virtue and why Rails is missing a way to inject dependencies

auto_inject works fine with JRuby but not in its AOT compiled form, here it breaks with an ArgumentError, not sure if this is an issue or just a limitation of JRuby AOT compilation but here is the gist fwiw

I dug into that, there wasn't much on the topic other than a few posts saying that all things ruby & ruby-metaprogramming should be possible, but since AOT compilation happens in issolation on a file by file basis I think it might not be getting the full intent of include Inject[:thing]