Docs improved

This commit is contained in:
Christoph Haas 2020-08-16 19:22:22 +02:00
parent 8a9e5d6e46
commit 208c99341a

View file

@ -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.