git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Michael Dippery <mdippery@gmail.com>
Cc: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>,
	Pavan Kumar Sunkara <pavan.sss1991@gmail.com>,
	Mike Dalessio <mike@csa.net>
Subject: Re: git instaweb + webrick does not work
Date: Tue, 03 Aug 2010 15:07:48 -0700 (PDT)	[thread overview]
Message-ID: <m34ofbpcyr.fsf@localhost.localdomain> (raw)
In-Reply-To: <1272BF62-A0C8-4940-9472-E46C05BF1723@gmail.com>

Michael Dippery <mdippery@gmail.com> writes:

> I'm trying to use `git instaweb` with Ruby's webrick (which I have
> installed) on Mac OS X, but every time I fire up it up via `git
> instaweb --httpd=webrick`, I get the following error:
> 
> "webrick not found. Install webrick or use --httpd to specify
> another httpd daemon."
> 
> I _do_ have webrick. Asking around a bit, I was told the the problem
> may have been introduced in commit be5347b. Is this so? If not, any
> other ideas on what may be causing the problem?
> 
> I'm using Git v1.7.2.1 on Mac OS X 10.6.

To be more exact commit be5347b (git-instaweb: Put httpd logs in a
"$httpd_only" subdirectory, 2010-05-28) by Pavan Kumar Sunkara added
resolve_full_httpd before running *_config (webrick_config in this
case).  But resolve_full_httpd() beside setting $httpd_only needed
later for functionality provided by this commit, does also setting
$full_httpd and checking if given web server can be run.

The `webrick' support in git-instaweb is peculiar in that webrick_conf
creates 'webrick' shell script in "$GIT_DIR/gitweb/".  The code that
checks if web server is available in resolve_full_httpd() searches
also in "$GIT_DIR/gitweb/"... but it is run before webrick_conf
function in git-instaweb has a chance to generate 'webrick' script.

The solution would be to either split resolve_full_httpd() into one
function generating $httpd and $httpd_only, and second function
generating $full_httpd and checing for web server existence, or create
a separate check for 'webrick'.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2010-08-03 22:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 21:37 git instaweb + webrick does not work Michael Dippery
2010-08-03 22:07 ` Jakub Narebski [this message]
2010-08-03 22:34   ` [RFC/PATCH] Split resolve_full_httpd to prevent bug Jared Hance
2010-08-04 10:25   ` git instaweb + webrick does not work Eric Wong
2010-08-05  9:14     ` [RFC/PATCH 0/3] instaweb: fix and improve WEBrick support Eric Wong

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-all from there: mbox

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

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

  git send-email \
    --in-reply-to=m34ofbpcyr.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mdippery@gmail.com \
    --cc=mike@csa.net \
    --cc=normalperson@yhbt.net \
    --cc=pavan.sss1991@gmail.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 NNTP newsgroup(s).