-
Notifications
You must be signed in to change notification settings - Fork 254
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
Request: Support for dotenv-rails
, to load GOOGLE_TRANSLATE_API_KEY
from .env.development
#395
Comments
@ndbroadbent Just an idea: I recently found https://direnv.net/, which is a more general solution to the same problem and should fix your problem as well. |
This would be good for DeepL as well, which can't be controlled by environment variables at all. |
you can do the following to pick up variables from dotenv:
|
i18n-tasks/lib/i18n/tasks/configuration.rb Lines 66 to 68 in 105c0f4
|
@glebm ok, it's been there for years, apparently :D I think this should be mentioned in the README.md though, as it's only obvious from reading the source. |
Hello, I use the
dotenv-rails
gem to define configuration vars in.env
,.env.test
,.env.development
, etc. This doesn't seem to be working withi18n-tasks
. I've setGOOGLE_TRANSLATE_API_KEY
in my.env.development
file, but it looks likei18n-tasks
doesn't load the Rails environment, so I get this error:It would be nice if
i18n-tasks
could work together withdotenv-rails
to load these env vars from.env
files.Also I realize that it's very difficult to maintain an open source project, so if this is too much work or no-one else wants it, then please feel free to close it. Thanks for all your work!
The text was updated successfully, but these errors were encountered: