ysbaddaden / prax

Rack proxy server for development
http://ysbaddaden.github.io/prax/
Other
475 stars 49 forks source link

Racker doesnt properly load .env file #95

Closed AskarZinurov closed 9 years ago

AskarZinurov commented 9 years ago

I'm using dotenv-rails gem for storing some application configs. Gem allows to describe .env file in various formats https://github.com/bkeepers/dotenv/blob/master/lib/dotenv/parser.rb#L12:

SOME_VARIABLE: 'value'

and

SOME_VARIABLE= 'value'

But prax understands only:

export SOME_VARIABLE='value'
creature commented 9 years ago

I hadn't seen this ticket, but I also had this problem and have sent a pull request to fix it.

ysbaddaden commented 9 years ago

Prax shouldn't crash but log a warning when a .env file can't be properly sourced.

ysbaddaden commented 9 years ago

Prax understands .env files as described by foreman and heroku config -s, so it understandsSOME_VARIABLE=value and transforms it as export SOME_VARIABLE=value before sourcing.