Skip to content
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

Replace the figaro gem to dotenv-rails gem #23

Closed
andyduong1920 opened this issue Jul 31, 2017 · 4 comments
Closed

Replace the figaro gem to dotenv-rails gem #23

andyduong1920 opened this issue Jul 31, 2017 · 4 comments

Comments

@andyduong1920
Copy link
Member

The problem is we want to share the ENV variable between Rails and Node JS on the development environment.

For Rails, the figaro use the application.yml to export the ENV variables.

For Node JS, we use the dotenv to load the ENV on development environment, the ENV variables store in .env file.

So the problem now is we have 2 places to store the ENV variable for the development environment, 1 is application.yml for Rails and 1 is .env for Node JS.

So on Rails, if we change the Gem from figaro to dotenv-rails, we can use the same .env file both Rails and Node JS.

@midnight-wonderer
Copy link

I prefer the docker-compose way and removing both gems altogether.
Just my 2 cents anyway.

@abhinavmsra
Copy link
Contributor

@MidnightWonderer we could use that when we deploy docker containers, which we dont yet.

@olivierobert
Copy link
Contributor

olivierobert commented Aug 3, 2017

@anduonghien way back, we used to rely on dotenv but moved to Figaro as it has better support for Heroku + we can group/share variables for all environment in a single file vs multiple files with dotenv (.env.development, .env.test).

As for sharing env variables between Ruby and JS, it's not a critical issue in our current setup as we usually have a JS to a front-end client (not a Node.JS app) which is not sharing much dependency with the Ruby backend.

But if we find it's something we would like to have to be future-proof then I don't see any issue to switch back

@malparty
Copy link
Member

malparty commented Jul 4, 2023

Closed in favor of #394 (sorry for that duplicate 🙈 )

@malparty malparty closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants