I've recently encountered a problem when using Foreman in conjunction with Dotenv on a Rails project. I've got a ENV file with a multiline string like so:
MULTILINE_ENV_VAR="
Here is
a multiline
env var
"
When I spin up the application as normal (i.e. bundle exec rails s) the env var works as expected, however, if I add the command to a Procfile like so:
web: bundle exec rails s
And run foreman start, the ENV var gets munged. I've created an example Rails project here to demonstrate the error. Here's some screenshots too:
With rails s
With foreman start
I'm not sure if this is a bug with Dotenv or Foreman, but thought it best to try here first.
I've recently encountered a problem when using Foreman in conjunction with Dotenv on a Rails project. I've got a ENV file with a multiline string like so:
When I spin up the application as normal (i.e.
bundle exec rails s
) the env var works as expected, however, if I add the command to a Procfile like so:And run
foreman start
, the ENV var gets munged. I've created an example Rails project here to demonstrate the error. Here's some screenshots too:With
rails s
With
foreman start
I'm not sure if this is a bug with Dotenv or Foreman, but thought it best to try here first.