Fix #40518 by avoiding setting APP_PATH if already defined#40521
Fix #40518 by avoiding setting APP_PATH if already defined#40521santib wants to merge 1 commit intorails:masterfrom
Conversation
|
This happens because we now load Spring after we set Prior to #39225, I think it would be reasonable to instead set |
|
To be fair I'm more inclined to revert the spring changes. I don't think they simplify anything in our setup, maybe the requirement of generating the binstubs, but we can still simplify generating the binstubs without changing how and when spring is loaded. |
|
I think the original intent of the Spring changes was to ensure that, if Spring is installed, the app is always loaded via Spring in development and test, and never loaded via Spring otherwise. (Perhaps DHH can confirm?) Loading Spring in |
All Custom bins don't work with the current setup anyway. Spring only works for the commands that are registered on it. |
Follow-up to rails#39746. This shifts the responsibility of loading Spring from `config/boot.rb` back to the relevant bin files. Fixes rails#40518. Closes rails#40521.
Follow-up to rails#39746. This shifts the responsibility of loading Spring from `config/boot.rb` back to the relevant bin files. Fixes rails#40518. Closes rails#40521. (cherry picked from commit acc837e)
Summary
Resolves #40518
I was able to confirm that this is caused by
spring. Thebin/railsbinstub is getting called twice when usingspring, and the second time it is called, thealready initialized constantwarning is triggered.Without spring
