気づき #865
奈良 裕記 さんが4年以上前に更新
Redmineの運用にて、Rake コマンド利用事例の蓄積用チケット
Rakeの基本的な使い方まとめ
http://unageanu.hatenablog.com/entry/20100829/1283069269
Railsドキュメント Rake
http://railsdoc.com/rake
下記、redmineのパスに移動して実行
cd /var/lib/redmine (redmineインストール先パスにより異なる)
---
h2. Redmineアップデート時処理関連
h3. Redmine本体のDB更新
bundle exec rake db:migrate RAILS_ENV=production
h3. RedmineプラグインのDB更新
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
h3. プラグインのアンインストール時にDBから削除
bundle exec rake redmine:plugins:migrate NAME=プラグイン名 VERSION=0 RAILS_ENV=production
これでschema_migrationからも削除される。
h3. キャッシュとセッションファイルのクリア(Redmine本体バージョンアップ後)
bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
---
h2. その他運用
h3. 期日が間近のチケットをメールで通知する(リマインダ機能)
http://redmine.jp/faq/issue/send_reminders/
コマンドラインで bundle exec rake redmine:send_reminders を実行
h3. テストの実行(本体/プラグイン)
http://redmine.jp/tech_note/plugins/developer/quickref/run-test/
---
h2. Rake自身など
h3. rake のコマンド一覧表示
bundle exec rake -T RAILS_ENV=production
実行可能なrakeコマンドの一覧が表示される。
h3. route情報の表示
bundle exec rake routes RAILS_ENV=production
Prefix Verb と、対応する URI Pattern Action
Prefix Verb URI Pattern Controller#Action
home GET / welcome#index
signin GET|POST /login(.:format) account#login
h3. Roleと、許可されるactionを表示
bundle exec rake redmine:permissions RAILS_ENV=production
Permission Name - controller/action pairs
:add_documents - documents/new, documents/create, documents/add_attachment, attachments/upload
h3. 行数の表示(LOC/Classes/Methods)
bundle exec rake stats RAILS_ENV=production
!https://unofficial-redmine.org/matomo/matomo.php?idsite=1&rec=865! !https://unofficial-redmine.org/matomo/matomo.php?idsite=1&rec=1!
戻る