New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RACK_ENV is not respected #633

Closed
igorsantos07 opened this Issue Aug 11, 2011 · 6 comments

Comments

Projects
None yet
3 participants
@igorsantos07

igorsantos07 commented Aug 11, 2011

I've been using the env var RACK_ENV in my production webserver when I'm running sinatra apps.
But looks like Padrino doesn't respect this var. I need to run padrino s -e production to open the server in prod mode.
Shouldn't it use RACK_ENV too?

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE
Member

DAddYE commented Aug 11, 2011

@DAddYE DAddYE closed this Aug 11, 2011

@igorsantos07

This comment has been minimized.

Show comment
Hide comment
@igorsantos07

igorsantos07 Aug 12, 2011

Doesn't look it's working...
I've tried RACK_ENV=production padrino s and it still starts as dev.

I noticed that inside boot.rb, when i run padrino s both
ENV['PADRINO_ENV'] and ENV['RACK_ENV'] are 'development'. But if I open
irb and run puts ENV['RACK_ENV'], it throws "production".
Am I missing something? =(

igorsantos07 commented Aug 12, 2011

Doesn't look it's working...
I've tried RACK_ENV=production padrino s and it still starts as dev.

I noticed that inside boot.rb, when i run padrino s both
ENV['PADRINO_ENV'] and ENV['RACK_ENV'] are 'development'. But if I open
irb and run puts ENV['RACK_ENV'], it throws "production".
Am I missing something? =(

@nesquena nesquena reopened this Aug 12, 2011

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Aug 12, 2011

Member

Looks like there is still an issue here

Member

nesquena commented Aug 12, 2011

Looks like there is still an issue here

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Aug 12, 2011

Member

Yea, any idea? Im sure that work because Im using passenger which set RACK_ENV and padrino properly handle it.

Member

DAddYE commented Aug 12, 2011

Yea, any idea? Im sure that work because Im using passenger which set RACK_ENV and padrino properly handle it.

@igorsantos07

This comment has been minimized.

Show comment
Hide comment
@igorsantos07

igorsantos07 Aug 12, 2011

http://pastie.org/2361400 Does this help in any way?

-= EDIT =-
https://github.com/padrino/padrino-framework/blob/master/padrino-core/lib/padrino-core/cli/base.rb#L113
This is the problem. Looks like it obeys only to PADRINO_ENV, not RACK_ENV.

igorsantos07 commented Aug 12, 2011

http://pastie.org/2361400 Does this help in any way?

-= EDIT =-
https://github.com/padrino/padrino-framework/blob/master/padrino-core/lib/padrino-core/cli/base.rb#L113
This is the problem. Looks like it obeys only to PADRINO_ENV, not RACK_ENV.

@ghost ghost assigned DAddYE Aug 23, 2011

DAddYE added a commit that referenced this issue Aug 23, 2011

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Aug 23, 2011

Member

Now should be fixed in 5d631d4, lets me know if you have other problems with that.

Member

DAddYE commented Aug 23, 2011

Now should be fixed in 5d631d4, lets me know if you have other problems with that.

@DAddYE DAddYE closed this Aug 23, 2011

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