RACK_ENV not defaulted to 'development' until after config.ru loads #78

Closed
dstrelau opened this Issue Apr 27, 2012 · 0 comments

Comments

Projects
None yet
2 participants

While RACK_ENV defaults to development properly, it's not set until after the config.ru is evaluated, meaning you can't, eg, conditionally load middleware.

Consider the following rackup file. Other servers, including rackup will print development while puma spits out nil.

p ENV['RACK_ENV']
run ->(e){[200,{},[]]}

(PS: puma is awesome. thank you!)

@evanphx evanphx closed this in 208c2f5 Apr 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment