git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git instaweb + webrick does not work

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 3, 2010, 22:07 UTC
Message-ID
<m34ofbpcyr.fsf@localhost.localdomain>
In-Reply-To
<1272BF62-A0C8-4940-9472-E46C05BF1723@gmail.com>
Michael Dippery <mdippery@gmail.com> writes:
Show 12 quoted lines
> 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
Previous: Michael DipperyNext: Jared Hance
Message 2 of 5 in “git instaweb + webrick does not work”
  1. Michael DipperyAug 3, 2010
  2. Jakub NarebskiAug 3, 2010
  3. Split resolve_full_httpd to prevent bug.Jared Hance, Aug 3, 2010
  4. Eric WongAug 4, 2010
  5. 0/3 instaweb: fix and improve WEBrick supportEric Wong, Aug 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.