Closed TopOneOfTopOne closed 8 years ago
Silly question but have you tried to access it with ENV["api_key"]
? Should work.
Yes I have, it returns nil
maybe I have done something wrong...
EDIT: I mean for windows. For OSX ENV['api_key']
returns the correct value as intended
The _FIGARO_
-prefixed key/value pair is set to keep track of which values were set by Figaro and which were already set by the system environment. This information is needed to determine which to override and which to leave alone if Figaro is loaded multiple times (as can happen).
Out of curiosity, does the presence of the additional key/value pairs cause any issue on OS X?
And on Windows, you still can't access ENV["api_key"]
? If that's the case, could you try to clone Figaro on Windows and run the test suite? I don't currently test against Windows since I have no easy way to do it. Thank you!
Also, if you're using Spring, make sure to restart it after you make changes to your config file. Or stop using Spring. 😊
No it does not cause any issues on OSX. Sure I will get on my windows computer and check again. But... Sorry to have bothered you, it is probably a problem on my end since I am a beginner. But I thank you your program really helps beginner programmers like me 😄
No bother at all! Hope I could help. I'll close the issue but feel free to comment again if you discover there is some bug. Thanks!
I appreciate your kindness, and after further investigation it was my fault :disappointed:
Thanks for reporting back! Care to share what was going on, in case somebody else is struggling with the same issue?
Looking at my ENV hash in rails console:
This is an issue since I cannot access api_key as usual i.e.
ENV['api_key']
UPDATE: This seems to only occur on my windows OS but on my OSX i obtain both keys
api_key
and_FIGARO_api_key
.