更新时间:2023-02-22 09:26:33
Dotenv.load(File.expand_path("../../.env.#{Rails.env}", __FILE__))
在研究Paritosh的答案时,我发现该文件需要指定每个环境。
upon researching Paritosh's answer I found that the file needed to specified per environment.
.env没有加载到Rails的rspec的测试环境中