diff --git a/Update-already-installed-Tracks-on-Ubuntu-21.04.md b/Update-already-installed-Tracks-on-Ubuntu-21.04.md new file mode 100644 index 0000000..7f681ae --- /dev/null +++ b/Update-already-installed-Tracks-on-Ubuntu-21.04.md @@ -0,0 +1,83 @@ +
This is a complement of the installation guide [[Install Tracks 2.5 on Ubuntu 20.10]]
+
+
+
it is not the best practice... but normally I do
+++>sudo -i
+
at the beginning to avoid all the sudos during the update
+++>systemctl stop mysql.service
+>systemctl stop apache2
+
Move the files Gemfile and Gemfile.lock out of the /var/wwww/tracks directory
+Normally they are modified after the last "pull" (retrieval) of git so when you pull again git will inform a conflict due to the late modifications.
+++>cd /var/www
+>git pull
+
compare the configuration file database.yml.tmpl with yours database.yml
+compare the configuration file site.yml.tmpl with yours site.yml
+ ++>cd /var/www/tracks+
+>bundle update +
you can also use
++>bundle install ++ +
All the files should be owned by the user ''www-data'' which is the user that runs Apache.
+To set the owner and the owner group of all the files to www-data, at /var/www execute
++>chown -R www-data:www-data tracks ++
then you need to set the access rights, the simplest way is at /var/www execute
++>chmod -R 777 tracks ++
later once you have all running you can correctly set
++> find /var/www/tracks -type d -exec chmod 700 '{}' \;+
+> find /var/www/tracks -type f -exec chmod 600 '{}' \;
+> find /var/www/tracks/script -type f -exec chmod 700 '{}' \; +
The ''find'' and ''chmod'' commands will set permissions as ''700'' for all directories and files inside the ''script'' directory.
+All other files will have permissions set to ''600''.
+ +++ +>systemctl start mysql.service
+
+>cd /var/www/tracks+
+>rake --rakefile=/var/www/tracks/Rakefile db:migrate RAILS_ENV=production
+>bundle exec rake db:migrate RAILS_ENV=production +
If you get the error : "ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime", that means that yourJavaScript runtime has lost its magic or you don't have a JavaScript runtime installed.
+When we installed "libapache2-mod-passenger" it suggested to install "nodejs"; so just install (or re-install) it."
++>apt install nodejs ++ +
+>cd /var/www/tracks+ +
+>rake --rakefile=/var/www/tracks/Rakefile assets:precompile RAILS_ENV=production
+>bundle exec rake assets:precompile RAILS_ENV=production +
+>systemctl start apache2
+