From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Wayne Larsen Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: [PATCH] set RACK_ENV on startup Date: Tue, 3 Nov 2009 19:24:16 -0600 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1257297874 26496 80.91.229.12 (4 Nov 2009 01:24:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Nov 2009 01:24:34 +0000 (UTC) To: mongrel-unicorn@rubyforge.org Original-X-From: mongrel-unicorn-bounces@rubyforge.org Wed Nov 04 02:24:27 2009 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org X-Mailer: Apple Mail (2.1076) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:125 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1N5Ubq-0001F9-H3 for gclrug-mongrel-unicorn@m.gmane.org; Wed, 04 Nov 2009 02:24:26 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 2CB3D18582CC; Tue, 3 Nov 2009 20:24:25 -0500 (EST) Received: from mail-yx0-f187.google.com (mail-yx0-f187.google.com [209.85.210.187]) by rubyforge.org (Postfix) with ESMTP id 2274918582AC for ; Tue, 3 Nov 2009 20:24:20 -0500 (EST) Received: by yxe17 with SMTP id 17so5970768yxe.33 for ; Tue, 03 Nov 2009 17:24:19 -0800 (PST) Received: by 10.151.29.8 with SMTP id g8mr1480072ybj.250.1257297859815; Tue, 03 Nov 2009 17:24:19 -0800 (PST) Received: from ?192.168.0.11? (71-17-13-49.regn.hsdb.sasknet.sk.ca [71.17.13.49]) by mx.google.com with ESMTPS id 16sm269763gxk.3.2009.11.03.17.24.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Nov 2009 17:24:19 -0800 (PST) Most stupid patch ever, but is there a reason not to set RACK_ENV on startup with `unicorn`, as RAILS_ENV is set with `unicorn_rails`? Thanks Wayne --- bin/unicorn | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bin/unicorn b/bin/unicorn index 0fed11e..9967f87 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -58,6 +58,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| opts.on("-E", "--env ENVIRONMENT", "use ENVIRONMENT for defaults (default: development)") do | e| + ENV['RACK_ENV'] = e env = e end -- 1.6.0.1