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.6 required=5.0 tests=FREEMAIL_FROM, MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,T_DKIM_INVALID shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Joseph McDonald Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: running unicorn under rvm Date: Tue, 17 Aug 2010 15:37:18 -0700 Message-ID: References: <20100817035202.GA2570@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1282085110 28259 80.91.229.12 (17 Aug 2010 22:45:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2010 22:45:10 +0000 (UTC) Cc: unicorn list To: Eric Wong Original-X-From: mongrel-unicorn-bounces@rubyforge.org Wed Aug 18 00:45:06 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=kOm1VmwM9n6i12B7Qp1victndxM9ZLLhEpAH/3K1ujg=; b=EKcrN22o1eCxZ/uUl7PYfkLP2AG4Enq2SWIq5Xg3VhuWLeK4kWW8z2AE7QtEbezqA6 AZIjezHIs7TXWvK7cklmYBWCdoPXLz681RerfZBlXSz+DXbRYMVQMOzI2QIDYdo5Ttgu EOnD6chBlO8st6McoA0wO4BfI+UU/yojf9o84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=csfPjTDt55hyoFKRJATjuKK+NpMko9ET/WEyS+BtcKDmYynQp8pG08OvLCldDjzvh5 pdtE2syxebhFwRaJbA1fGPzh1V0PvcQkj31R5O4htrtIvfCQHUrxa0OKIV29XjAWNWT9 e9N7SijvO5tU/mM7V/7rnXpTQwrgLLeOKTVrY= In-Reply-To: <20100817035202.GA2570@dcvr.yhbt.net> 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:672 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OlUtx-0002EG-DI for gclrug-mongrel-unicorn@m.gmane.org; Wed, 18 Aug 2010 00:45:01 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 4AA28185835E; Tue, 17 Aug 2010 18:45:00 -0400 (EDT) Received: from mail-qw0-f50.google.com (mail-qw0-f50.google.com [209.85.216.50]) by rubyforge.org (Postfix) with ESMTP id 20EDE1858357 for ; Tue, 17 Aug 2010 18:37:19 -0400 (EDT) Received: by qwf7 with SMTP id 7so647831qwf.23 for ; Tue, 17 Aug 2010 15:37:18 -0700 (PDT) Received: by 10.229.218.69 with SMTP id hp5mr5373913qcb.18.1282084638800; Tue, 17 Aug 2010 15:37:18 -0700 (PDT) Received: by 10.229.43.215 with HTTP; Tue, 17 Aug 2010 15:37:18 -0700 (PDT) Thanks Eric, see below: On Mon, Aug 16, 2010 at 8:52 PM, Eric Wong wrote: > Joseph McDonald wrote: >> unicorn 1.1.2 runs fine under my system ruby, but when trying to run >> it using rvm, I get: >> >> >> % rvm use 1.8.7 >> info: Using ruby 1.8.7 p299 >> >> % unicorn >> /home/joe/.rvm/gems/ruby-1.8.7-p299/gems/unicorn-1.1.2/lib/unicorn/confi= gurator.rb:494:in >> `eval': undefined local variable or method `host' for main:Object >> (NameError) > > Hi Joseph, > > Is there any chance you have an older "unicorn" executable script > somewhere that gets exposed rvm switches the environment on you? =A0That's > the only thing I can think of right now. I'm sure I'm running the right version of unicorn. what's weird is if I remove the reference to TOPLEVEL_BINDING, it works, i.= e.: host, port, set_listener, options, daemonize =3D eval("[ host, port, set_listener, options, daemonize ]") works, it gets the right port from the config.ru file. my config.ru file looks like" #\ -w -p 4452 require './mystuff' run Sinatra::Application another strange thing: I need to add the "./" in front of mystuff, but when i'm not using rvm (rvm use system), I don't need to do that. I'm curious if anyone else is using unicorn with rvm and not having this problem. I'm guessing it's something weird with my system, but not sure. thanks, -joe > >> line 494 looks like: >> >> =A0# XXX ugly as hell, WILL FIX in 2.x (along with Rainbows!/Zbatery) > > Yes, I still need to work on 2.x and clean up a lot of the > ugly internal API bits :) > > > -- > Eric Wong > > P.S.: At least nowadays I'm (finally) getting some experience > developing/supporting applications using Unicorn and Rainbows! (or > Zbatery). =A0Things like e4d0b226391948ef433f1d0135814315e4c48535 in > unicorn.git are a direct result of that. > _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying