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

Re: [PATCH] instaweb: support for Ruby's WEBrick server

From
EWEric Wong <normalperson@yhbt.net>
Date
Sep 17, 2007, 11:55 UTC
Message-ID
<20070917115518.GA26815@soma>
In-Reply-To
<618c07250709161935g333f0536q31b453bd58f2d75d@mail.gmail.com>
Mike Dalessio <mike@csa.net> wrote:
Show 7 quoted lines
> running the webrick server with git requires Ruby and Ruby's YAML and
> Webrick libraries (both of which come standard with Ruby). nice for
> single-user standalone invocations.
> 
> the --httpd=webrick option generates a (short!) ruby script on the fly to
> read httpd.conf options and invoke the web server via library call. this
> script is placed in the .git/gitweb directory.

Nice. I'm in favor of adding WEBrick since it's fairly commonly installed on developer boxes and is more consistently available if available at all. Apache and lighttpd may not be compiled with some modules we need.

I'm having trouble applying this patch, however. It's whitespace-mangled and using long lines doesn't help mailers much.

Show 10 quoted lines
> Signed-off-by: Mike Dalessio <mike.dalessio@gmail.com>
> ---
>  Documentation/git-instaweb.txt |    3 ++-
>  git-instaweb.sh                |   29 ++++++++++++++++++++++++++++-
>  2 files changed, 30 insertions(+), 2 deletions(-)
> 
> +webrick_conf () {
> +    # generate a standalone server script in $fqgitdir/gitweb.
> +        cat > "$fqgitdir/gitweb/$httpd" <<EOF
> +#! /usr/bin/ruby

Could we make the shebang dynamic? (capturing the output of `which ruby` maybe, or just breaking down and using /usr/bin/env ruby). The ruby binary seems to appear all over the place on the filesystem from my experience, especially with its popularity amongst OSX users.

-- 
Eric Wong
Next: Thomas Adam
Message 1 of 4 in “Re: [PATCH] instaweb: support for Ruby's WEBrick server”
  1. Eric WongSep 17, 2007
  2. Thomas AdamSep 17, 2007
  3. Florian WeimerSep 17, 2007
  4. Mike DalessioSep 17, 2007

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.