From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.86.23.1 with SMTP id 1cs266932fgw; Mon, 14 Sep 2009 23:44:30 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.100.199.19 as permitted sender) client-ip=10.100.199.19; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.100.199.19 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.100.199.19]) by 10.100.199.19 with SMTP id w19mr12891701anf.33.1252997069886 (num_hops = 1); Mon, 14 Sep 2009 23:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :mime-version:content-type:received:date:x-ip:user-agent :x-http-useragent:message-id:subject:from:to:x-google-approved :reply-to:sender:precedence:x-google-loop:mailing-list:list-id :list-post:list-help:list-unsubscribe:x-beenthere-env:x-beenthere; bh=G5XRKoMaoAk7i6qGu3a1Net8GQL5H6YnMy4SIEXBM6k=; b=sCVSAKvqWAbL4Di0+WoFAA3UC3Y6FlavjDRjbFTZh1xMRw8fpAyFSAlLJ4KBtRjnGV smXr1D+aMqY43jvRy5+jJDL1NKbwNhb5KEnu/3cdF2xZMn7bPEk6KS8432SPIdQYMYVa ellOqnb7YeNhLQOAE4Md0CNvx0Kq3cqaa4DAM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:mime-version:content-type:date:x-ip :user-agent:x-http-useragent:message-id:subject:from:to :x-google-approved:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=uSTul2Mu4UgbuAQRTytd3tRQ7B3zu4KoIJpI5gLdzWJDIN+ljo0wR0odM9tUKAaEE1 oS4stevjcjiZEU8uyDT46ytUUpH/FsNFuedJf8shrJTD3r8Hy2tbbgOKGVvKqyz00VsR sSoCsjLYmLuFLV3fJKiH7IKjN6hKY/GpjU898= Received: by 10.100.199.19 with SMTP id w19mr1613200anf.33.1252997069765; Mon, 14 Sep 2009 23:44:29 -0700 (PDT) Received: by 10.177.128.16 with SMTP id f16gr1665yqn.0; Mon, 14 Sep 2009 23:44:16 -0700 (PDT) X-Sender: andi.bade@gmail.com X-Apparently-To: rack-devel@googlegroups.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Received: by 10.150.19.3 with SMTP id 3mr2177664ybs.12.1252993068194; Mon, 14 Sep 2009 22:37:48 -0700 (PDT) Date: Mon, 14 Sep 2009 22:37:48 -0700 (PDT) X-IP: 213.61.33.70 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9,gzip(gfe),gzip(gfe) Message-ID: <1a9d3b3d-8685-4163-8a3c-7b952c2ad228@f33g2000vbm.googlegroups.com> Subject: Problem with Sinatra::Application.root if starting daemonized From: "Andi B." To: Rack Development X-Google-Approved: james.britt@gmail.com via email at 2009-09-15 06:44:14 Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com Hi, if I start my sinatra-app with rackaup without --daemonize everything works fine and Sinatra::Application.root is the working-directory of my sinatra-app. But if I add the -D option Sinatra::Application.root gets my root-dir ("/"). This is something I did not expect. So I checked the code of the rack 1.0.0 gem and found the line 'Dir.chdir "/"' (bin/rackup line 161). I commented out this line and everything works fine. I am not sure about any side-effects, so I wanted to ask why you explicitly changes the working dir to root if starting daemonized. thx Andi