-
Notifications
You must be signed in to change notification settings - Fork 10
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
Ruby apps should set APP_ENV #34
Comments
Thanks for the suggestion @stefansundin! I think we can do this with fewer backwards-compatibility concerns in our upcoming AL2-based Ruby platform. Changing it in our existing platform needs some more research though. |
labisso
changed the title
[request]: Ruby apps should set APP_ENV
Ruby apps should set APP_ENV
Apr 2, 2020
Reopening. Inadvertently closed when removing the Proposed tag. |
Closing older issue that we are no longer considering, please do re-open if this is still relevant. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Community Note
Tell us about your request
The Ruby community has decided that
RACK_ENV
andRAILS_ENV
are complicated to use (and used incorrectly a lot). So they decided to addAPP_ENV
, the one variable to rule them all.Elastic Beanstalk is setting
RACK_ENV=production
as a default for new Ruby apps. It should start settingAPP_ENV=production
as well.Is this request specific to an Elastic Beanstalk platform?
Ruby
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
It's not hard to set new variables, but better defaults would make things easier for newbies.
Are you currently working around this issue?
I set
APP_ENV=production
manually after creating an app.Additional context
In addition,
RACK_ENV=production
is not an intended value (as seen in the rack code linked above). It has always been intended to be set to eitherdevelopment
,deployment
, ornone
. Unfortunately, Heroku and other websites have been telling Ruby developers to setRACK_ENV
andRAILS_ENV
to the same value, so this mistake is very common. ForAPP_ENV
, they allowproduction
and other values.I think the default
RACK_ENV
value should be changed todeployment
. This may have some backwards compatibility concerns, but it is the proper value. One way to deal with this is to also start settingRAILS_ENV=production
which should fix this concern for Rails developers.I also think it would be nice if there was a better way to set default environment variables through
.ebextensions
somehow. Something like Heroku lets you do via anapp.json
file (example).Thanks!
The text was updated successfully, but these errors were encountered: