Rails update. Fancybox update. Migrations from Paperclip.

This commit is contained in:
Christoph Haas 2020-10-19 18:49:15 +02:00
parent 1d97215591
commit 7ac69a1d8a
25 changed files with 305 additions and 115 deletions

View file

@ -16,7 +16,7 @@ applications you may know most of that already.
These APT-gettable packages are probably required to run the application:
apt install python-psycopg2 ruby sudo libssl-dev libreadline-dev \
sudo apt install ruby sudo libssl-dev libreadline-dev \
zlib1g-dev libbz2-dev libpq-dev git imagemagick
## Prepare PostgreSQL database server and user
@ -27,9 +27,10 @@ ident-based authentication. In development mode you will likely work as your own
create a development database in PostgreSQL and create a database user with a password to access it.
Put those credentials into ./config/database.yml
apt install postgresql
su - postgres
sudo apt install postgresql
sudo su - postgres
createuser -P -d debshots
# The password will have to match that in config/database.yml
createdb -O debshots -E UTF8 -T template0 debshots_dev
## Install the required Ruby version using rbenv
@ -46,9 +47,9 @@ 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.
As an upright Debian user we should use Debian packages. But this application
(as most web applications) requires specific versions of libraries and modules.
So rbenv isolates them from the rest of the system.
# Load rbenv automatically by appending
# the following to ~/.profile:
@ -109,8 +110,8 @@ If you get database access errors then check the *development* section in your
Get the latest information on packages from the Debian repositories.
bundle exec rails debshots:update_from_deb_repos RAILS_ENV=production
bundle exec rails debshots:update_longdescription_from_deb_repos RAILS_ENV=production
bundle exec rails debshots:update_from_deb_repos
bundle exec rails debshots:update_longdescription_from_deb_repos
## Run the application