On Fri, Apr 21, 2006 at 12:56:02PM +0100, will wrote:
} Edward F. wrote:
} >Debian Sarge works great.
}
} I will second that, apart from getting lighttpd working which is a
} complete pain in the arse. Such a pain in the arse that I used Apache
} and mod_fcgid instead
} (Peak Obsession).
}
} It has been fine so far. Where I had previously had stability issues
} with mod_fcgi, mod_fcgid is working great.
I never tried anything other than Apache2 + mod_fcgid, and I had little
trouble setting it up. I use a Debian Testing/Unstable mix (though I’d
use
sarge for deployment).
Incidentally, if you want rubygems (you probably do) and you want to
keep
them in /usr/local/lib instead of /usr/lib (following Debian policy),
you’ll need to do some work. I’m including a shell script that will let
you
install gems in /usr/local (or wherever). There is also some attempt to
wrap gems in Debian packages so that they are managed by apt/dpkg, but I
don’t know how far that effort has gotten.
Also, anything you can install via apt (e.g. RMagick, native postgresql
ruby
driver, etc.), you should.
} Will.
–Greg
#!/bin/sh
if test $# -ne 1 || test ! -d “$1”
then
echo “Usage: $0 ” >&2
exit 1
elif test ! -r setup.rb
then
echo “Please run from the toplevel RubyGems source directory” >&2
exit 2
fi
PREFIX=“sh -c \"cd \"$1\"; /bin/pwd\"
”
GEM_HOME=“$PREFIX/lib/site_ruby/gems”
export GEM_HOME
if test -d “$GEM_HOME”
then
cat <<-EOF >&2
The GEM_HOME directory already exists. Overwriting an existing
install will not work well. If you intend to reinstall, please
first remove $GEM_HOME
EOF
exit 3
elif ! mkdir -p “$GEM_HOME”
then
cat <<-EOF >&2
You do not have permission to install in the directory selected.
Perhaps you meant to install as root?
EOF
exit 4
fi
while test ! -e “$GEM_HOME/bin”
do
echo -n "Where should executables be installed [$GEM_HOME/bin]? " >&2
read dest
if test "$dest" = "" -a "$dest" = "$GEM_HOME/bin"
then
dest="$GEM_HOME/bin"
mkdir "$dest"
elif test -d "$dest"
then
dest="`sh -c 'cd \"$dest\"; pwd'`"
ln -s "$dest" "$GEM_HOME/bin"
else
echo "You must choose an existing directory." >&2
fi
done
ruby setup.rb config --prefix=“$PREFIX”
–siteruby=$prefix/lib/site_ruby &&
ruby setup.rb install
cat <&2
################################################################################
Be sure to set the GEM_HOME environment variable in your shell’s
init/config file to ‘$GEM_HOME’
For Bourne shell derivatives, add the following lines to your
~/.profile or the system-wide /etc/profile:
GEM_HOME="$GEM_HOME"
export GEM_HOME
For C shell derivatives, add the following line to your ~/.cshrc
(or ~/.tcshrc) or the system-wide /etc/csh.cshrc:
setenv GEM_HOME "$GEM_HOME"
################################################################################
EOF
exit 0
USERID=“id -ru
”
DFLTSHELL=“grep ':'$USERID':' /etc/passwd | head -1 | cut -d: -f7
”
PREFIX=“/tmp/$$”
$DFLTSHELL -c “export HOME && touch $PREFIX.sh || touch $PREFIX.csh”
2>/dev/null
if test -e $PREFIX.csh
then
cat <<-EOF >&2
Your shell seems to be a C shell derivative. Be sure to add the
following line to your ~/.cshrc (or ~/.tcshrc) and/or the
system-wide /etc/csh.cshrc:
setenv GEM_HOME "$GEM_HOME"
EOF
rm -f $PREFIX.csh
elif test -e $PREFIX.sh
then
cat <<-EOF >&2
Your shell seems to be a Bourne shell derivative. Be sure to add
the following lines to your ~/.profile and/or the system-wide
/etc/profile:
GEM_HOME="$GEM_HOME"
export GEM_HOME
EOF
rm -f $PREFIX.sh
else
cat <<-EOF >&2
Cannot determine your shell. Be sure to set the GEM_HOME
environment variable in your shell's init/config file to
'$GEM_HOME'
EOF
fi