From 208c99341a32948454e110c390edbf94fdfd4eef Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 16 Aug 2020 19:22:22 +0200 Subject: [PATCH] Docs improved --- doc/README.Development.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/doc/README.Development.md b/doc/README.Development.md index e3a8e36..ebab50a 100644 --- a/doc/README.Development.md +++ b/doc/README.Development.md @@ -12,8 +12,6 @@ The following section documents the steps you need to do to get the application running in development mode. If you are a little experienced in developing Rails applications you may know most of that already. -Development worked best on a Debian Jessie or Sid system. - ## Install dependencies These APT-gettable packages are probably required to run the application: @@ -31,8 +29,8 @@ Put those credentials into ./config/database.yml apt install postgresql su - postgres - createuser -P -d debshots_dev - createdb -O debshots_dev -E UTF8 -T template0 debshots_dev + createuser -P -d debshots + createdb -O debshots -E UTF8 -T template0 debshots_dev ## Install the required Ruby version using rbenv @@ -48,6 +46,10 @@ To install it for your current user: git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile +As an upright Debian user we should use Debian packages. But Rails advances faster than +Debian releases and an outdated 'rbenv' version will not be able to install newer +Ruby versions. + # Load rbenv automatically by appending # the following to ~/.profile: @@ -66,14 +68,25 @@ Clone the debshots Git repository from https://salsa.debian.org/debian/debshots rbenv install echo "gem: --no-rdoc --no-ri" > ~/.gemrc gem install bundler + +If this command complains that it cannot write into /var/lib/gems/… then please +source your ~/.profile or ~/.zshrc or open a new terminal window to let rbenv +take over. + bundle install ## Optional: copy screenshots and database from the live website +To make database access easier you can create a ~/.pgpass file like: + + 127.0.0.1:5432:debshots_dev:debshots_dev:thepassword + +Don't forget to "chown 0600" that file. + scp screenshots.debian.net:debshots-screenshots.tar . tar -C public/ -xvf debshots-screenshots.tar scp screenshots.debian.net:debshots.sql . - psql debshots_dev < debshots.sql + psql -h 127.0.0.1 debshots_dev debshots-dev < debshots.sql Make sure that the application's database schema is upgraded to reflect the latest state of development.