rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: "Andi B." <andi.bade@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Problem with Sinatra::Application.root if starting daemonized
Date: Mon, 14 Sep 2009 22:37:48 -0700 (PDT)	[thread overview]
Message-ID: <1a9d3b3d-8685-4163-8a3c-7b952c2ad228@f33g2000vbm.googlegroups.com> (raw)


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

                 reply	other threads:[~2009-09-15  6:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1a9d3b3d-8685-4163-8a3c-7b952c2ad228@f33g2000vbm.googlegroups.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).