Closed creature closed 10 years ago
I'm not confortable with hacks that actually avoid a bug for a specific gem. It also assumes that bundler is installed, thought it may not (I'm using Prax with pure JS projects, with port forwarding to vagrant boxes, etc).
An actual solution would be to either:
.env
file can't be parsed;.env
parser to preparse X: y
as X=y
before sourcing;.env
file to be compatible with Prax, heroku config -s
, foreman, ...
Dotenv is a gem that helps Rails applications keep their configuration in environment variables, and loads them automatically upon application startup. This configuration is stored in a file called
.env
. Prax also tries to load environment variables from.env
upon startup.If your environment variables are both in a Bash-friendly format, this doesn't matter. But Dotenv allows users to use YAML to store their config; Bash can't source this, which causes the app to fail to start without outputting anything into the log.
This pull request checks for the existence of Dotenv in your bundle. If it finds it, then Prax will not load your
.env
file. Instead, it leaves that up to Dotenv.This should fix https://github.com/ysbaddaden/prax/issues/95.