Zajímavé odkazy
- Linux
- CZfree
- OpenSource SW
- HomeOffice
- Ostatní
- Zajímavosti
Provozují SPOJE.NET.
Nejlepší internet v Praze.
apt-get install ruby-dev gem install bundler
Pokud pouzivame ruby 1.9 a vyssi, zmenime v soubory database.yml radek adapter: mysql
⇒ adapter: mysql2
Do souboru configuration.yml (pokud tam jeste neni), pridame secret_token: 'abcd'
kde abcd bude nahodny retezec
bundle install --without development test
bundle update
bundle exec rake generate_secret_token bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
bundle exec rake tmp:cache:clear tmp:sessions:clear
Pokud provedeme nejakou zmenu ve strukture databaze, je nutne vzdy potom zavolat bundle exec rake db:migrate RAILS_ENV=production
v root adresari redmine a potom restartovat Apache
Pokud provedeme instalaci noveho pluginu (umistujeme do adresare plugins), je nutne zavolat rake redmine:plugins:migrate RAILS_ENV=production
a potom restartovat Apache
Pokud chceme plugin odinstalovat, je potreba zavolat rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production
, potom smazat plugin z adresare plugins a restartovat Apache
CREATE VIEW nextcloud_user AS SELECT users.login, users.hashed_password, users.salt, email_addresses.address FROM users INNER JOIN email_addresses ON (users.id=email_addresses.user_id) WHERE users.status=1 AND users.type="User";
gem install bundler -v 1.16.1 bundler -v Bundler version 1.16.1
gem uninstall bundler Select gem to uninstall: 1. bundler-1.17.1 2. bundler-2.1.4 3. All versions
Pokud po aktualizaci redmine zaznamename pri vkladani poznamek k ticketu nasledujici chybu
translation missing: en.field_send_notification changed from 0 to --- !ruby/object:Mail::Message body: !ruby/object:Mail::Body boundary: --==_mimepart_52a0ad837f377_63933fb8c3f4a54081298 preamble: ....
potom je potreba odstranit v tabulce issue sloupec send_notification a nasledne potom zavolat prikaz bundle exec rake db:migrate RAILS_ENV=production
a restartovat apache.
Pokud uz se nam prihodilo, ze jsou nektere poznamky k ticketu o tyto hlasku prodlouzeny, najdeme je a smazeme z tabulky journal_details
PassengerUploadBufferDir /cesta/redmine/passenger/
a zkontrolovat ze v adresari redmine tento existuje a ma do nej apache pravo zapisu
Od verze 5 se to jmenuje - PassengerDataBufferDir
We had the same issue and after some investigations, we found that the problem was generated by the redmine_agile plugin. /assets/stylesheets/redmine_agile.css html { - overflow-y: inherit !important; + /* overflow-y: inherit !important; */ }
gem install bundler:1.17.1
bundle update --bundler
Pokud to vypise nejakou chybu o neexistence verze v repozitari, tak provedte update prislusneho balicku, ktery to pise, napr.:
bundle update mimemagic
Nakonec provest stadanrdni postup pri upgradu redmine viz. vyse.
Pokud nestartuje po upgradu apache - stalo se mi pod LXC
sed -i -e 's,PrivateTmp=true,PrivateTmp=false\nNoNewPrivileges=yes,g' /lib/systemd/system/apache2.service
systemctl daemon-reload
Pri migraci muze hlasit potize s pravama - nektere tabulky v databazi maji jineho vlastnika nez uzivatele, ktery se pouzova pro pripojeni z redmine. Resenim je opravit vlastnika:
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" redmine` ; do psql -c "alter table \"$tbl\" owner to redmine" redmine ; done for tbl in `psql -qAt -c "select table_name from information_schema.views where table_schema = 'public';" redmine` ; do psql -c "alter view \"$tbl\" owner to redmine" redmine ; done for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" redmine` ; do psql -c "alter sequence \"$tbl\" owner to redmine" redmine ; done
gitolite compile gitolite setup --hooks-only gitolite trigger POST_COMPILE
# look for "git-config" in the documentation GIT_CONFIG_KEYS => '.*', LOCAL_CODE => "$ENV{HOME}/local",
bundle exec rake redmine_git_hosting:update_repositories RAILS_ENV=production bundle exec rake redmine_git_hosting:fetch_changesets RAILS_ENV=production bundle exec rake redmine_git_hosting:install_gitolite_hooks RAILS_ENV=production bundle exec rake redmine_git_hosting:install_hook_parameters RAILS_ENV=production bundle exec rake redmine_git_hosting:install_gitolite_hooks RAILS_ENV=production
Pokud najdeme v logu logs/git_hosting.log
tyto hlasky:
2022-07-26 18:28:25 +0200 [ERROR] Access denied for Gitolite Admin SSH Keys 2022-07-26 18:28:25 +0200 [ERROR] unsupported URL protocol
a zaroven v konfigurace git hostingu v redmine na karte configtest sviti v kolonce Rugged compiled features ssh červeně, tak je potřeba nainstalovat znova gem rugged s podporou ssh
# gem list | grep rugged rugged (0.99.0) # gem uninstall rugged # apt-get install libssh2-1-dev # gem install rugged -v 0.99.0
# rake redmine:migrate_from_trac RAILS_ENV="production" WARNING: a new project will be added to Redmine during this process. Are you sure you want to continue ? [y/N] y Trac directory []: /var/local/projects/prometheus Trac database adapter (sqlite3, mysql2, postgresql) [sqlite3]: Trac database encoding [UTF-8]: Target project identifier []: prometheus This project already exists in your Redmine database. Are you sure you want to append data to this project ? [Y/n] y Trac database version is: 26 Migrating components. Migrating milestones........... Migrating custom fields Migrating tickets.................................... Migrating wiki...................................................... Components: 1/1 Milestones: 11/11 Tickets: 36/36 Ticket files: 0/0 Custom values: 0/0 Wiki edits: 54/54 Wiki files: 0/0