-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotenv-rails loads dev environment when running system tests with Rails 7 #439
Comments
so is this fixed? the referred to PR is still open |
Seeing all these open/ignored PRs and issues makes me think again about using dotenv in my project. Kinda worrying that Kamal is using it by default. |
@Samuelodan dotenv is an incredibly simple and stable library. I don't spend a lot of time maintaining it because it just works for me and most people, and I get tired of ungrateful users that complain and don't offer to help. |
Hmm, I'm fairly new to all this, and I'm worried about how to manage .env files. These didn't seem to me like ungrateful users because they did in fact offer to help. But I hear open source work can be thankless and exhausting at times, so I apologize if my remarks made you feel that kinda away about your work. Thanks for (building? and) maintaining this library. Chances are I'm overanalyzing the problem, so I'll give it a shot and see how it goes. |
When running system tests with Rails 7, the development environment variable files are loaded before loading the test ones.
This is most likely a bug in Rails 7, see rails/rails#43937
I am opening the issue here in case somebody else is hitting this and wonders whats happening.
Steps to reproduce
.env.dev
define a variable.env.test
Expected behavior
Your env variable should not be defined
Actual behavior
The variable for dev env is defined
System configuration
dotenv version:
2.7.6
Rails version:
7.0.0
Ruby version:
3.0.3
The text was updated successfully, but these errors were encountered: