rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: James Tucker <jftucker@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: [GitHub] ENV["RACK_ENV"] is not set on startup [rack/rack GH-11]
Date: Wed, 31 Mar 2010 15:12:13 +0100	[thread overview]
Message-ID: <920480E1-F9EE-4B06-98A4-77784BF66CCF@gmail.com> (raw)
In-Reply-To: <87hbnwr4pu.fsf@gmail.com>


On 31 Mar 2010, at 14:38, Christian Neukirchen wrote:

> 
>> Subject: [GitHub] ENV["RACK_ENV"] is not set on startup [rack/rack GH-11]
>> 
>> ENV["RACK_ENV"] is not set by rackup on startup, meanwhile at least
>> Passenger, Thin and Unicorn pass this to apps. Besides that Sinatra
>> and Merb use it to set their environment.  You can see the discussion
>> about that in the Unicorn list:
>> http://www.mail-archive.com/mongrel-unicorn@rubyforge.org/msg00123.html
> 
>> The patch to fix it here:
>> http://github.com/tundraghost/rack/commit/90e9dfedf454a1491d97ab1d145cd105fdb1c216
> 
> Discuss.

+1, almost every single framework uses this notion, I think we should have it in the spec.

The possible disparity here is that we use "deployment" and "none" traditionally (with Yehudas Rack::Server deprecating "none" to be implicit instead). I think the best option is to map "production" to "deployment" for the time being, and maybe look at deprecating "deployment" in say, a year, if at all (don't really see why it needs to be removed tbh, other than neatness).

I would argue that an ENV var should be the default unless the argument is explicitly specified, so that patch may be insufficient.

If we get more +1s, I'll import and fixup, as I've been poking Rack::Server recently.

> 
> -- 
> Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org
> 
> 
> -- 
> To unsubscribe, reply using "remove me" as the subject.

  parent reply	other threads:[~2010-03-31 14:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 13:38 [GitHub] ENV["RACK_ENV"] is not set on startup [rack/rack GH-11] Christian Neukirchen
2010-03-31 13:58 ` Nicolás Sanguinetti
2010-03-31 14:12 ` James Tucker [this message]
2010-03-31 22:40 ` Joshua Peek
2010-04-01  7:16   ` Eric Wong
2010-04-01  8:21     ` Matt Todd
2010-04-01  8:49       ` James Tucker
2010-04-01 21:13         ` Eric Wong
2010-04-02  4:03           ` Matt Todd
2010-04-08  8:46             ` James Tucker
2010-04-08 11:23               ` Matt Todd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=920480E1-F9EE-4B06-98A4-77784BF66CCF@gmail.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).