I think this is a little, easy question!
I'm using .env
file to keep all my environment variables, and i'm using foreman
.
Unfortunately, these environment variables are not being loaded when running rails console rails c
so, i'm now loading them manually after running the console, which is not the best way.
I'd like to know if there any better way for that.
About a year ago, the "run" command was added to foreman
ref: https://github.com/ddollar/foreman/pull/121
You can use it as follow:
foreman run rails console
or
foreman run rake db:migrate