Do you mean you are using dotenv
? rbenv
manages ruby installs and doesn't read .env
from what I searched in the source code. With dotenv, you can reload ENV from the .env
file by calling Dotenv.load
. It's probably going to give you warnings about constants being redefined. What I would do is make a config class to combine the default settings from ENV with the redefining feature/function you want. Config manages everything but reads defaults from .env
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…