Bitnami Redmine Stackを使って構築したRedmine3.3.2にチケットの親子関係をツリー状に表示してくれるプラグインの『Redmine Issues Tree』をインストールしようとして断念したお話です。
<2017/7/30追記>
Bitnami Redmine 3.3.2でも問題なく『Redmine Issues Tree』をインストール・使用できることを確認しました。
経緯
Redmineを使ってプロジェクト管理をするようになり、チケットに親子関係をもたせることが多くなりました。デフォルトの状態のチケット画面ではチケットの親子関係がわかりにくく使い勝手が悪かったので何か良いプラグインがないかと探してみました。
そうした所、ちょうど良さそうなプラグインが見つかったので早速インストールを試みました。
<参考>
Redmine 3.2でチケットを親子関係でツリー状に表示させるプラグイン『Redmine Issues Tree』
環境
まずは環境の確認から。
対象 | バージョン |
---|---|
OS | CentOS 7.1 |
Redmie | 3.3.2.stable |
Ruby | 2.1.10-p492 |
Ruby on Rails | 4.2.7.1 |
インストール
手順にしたがってプラグインをインストールしていきます。作業はRedmineが稼働しているサーバーにログインした状態で行います。
- プラグインのダウンロード
- Gemのインストール
- Gemfileの編集
- もう一回Gemのインストール
- DBのマイグレーション
- Redmineの再起動
以下のコマンドを実行します。
<2017/7/30追記>以下のコマンドは間違いです。
$ cd /opt/bitnami/apps/redmine/htdocs/plugins $ sudo git clone https://github.com/Loriowar/redmine_issues_tree.git
<2017/7/30追記>『Redmine Issues Tree』プラグインはインストール先のRedmineのバージョンによってブランチが分かれていますので、インストール先のRedmineのバージョンに対応したブランチからプラグインをダウンロードします。
$ cd /opt/bitnami/apps/redmine/htdocs/plugins/ $ sudo git clone -b 3.3.x https://github.com/Loriowar/redmine_issues_tree.git
このプラグインで使うGemをインストールします。
<2017/7/30追記>以下のコマンドは間違いです。”bundle install”のオプションに”–no-deployment”を指定する必要があります。
$ sudo /opt/bitnami/use_redmine bash-4.2# bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. You are trying to install in deployment mode after changing your Gemfile. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control. If this is a development machine, remove the Gemfile freeze by running `bundle install --no-deployment`. You have added to the Gemfile: * haml-rails * require_patch (~> 0.1.0)
なんかエラーが出ました。
<2017/7/30追記>“bundle install”のオプションに”–no-deployment”を指定する必要があります。
$ sudo /opt/bitnami/use_redmine bash-4.2# bundle install --no-deployment
<2017/7/30追記>「3.Gemfileの編集」から「4.もう一回Gemのインストール」の記述は間違いです。読み飛ばしてください。
ファイルの先頭に以下の記述を追加します。
<2017/7/30追記>Gemファイルの編集は不要です
source 'https://rubygems.org'
<2017/7/30追記>この手順は不要です
$ sudo /opt/bitnami/use_redmine bash-4.2# bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Fetching gem metadata from https://rubygems.org/............ Fetching version metadata from https://rubygems.org/... Fetching dependency metadata from https://rubygems.org/.. Resolving dependencies......... Installing rake 12.0.0 Installing concurrent-ruby 1.0.5 Installing i18n 0.8.4 Installing minitest 5.10.2 Installing thread_safe 0.3.6 Installing tzinfo 1.2.3 Installing activesupport 5.1.2 Gem::InstallError: activesupport requires Ruby version >= 2.2.2. An error occurred while installing activesupport (5.1.2), and Bundler cannot continue. Make sure that `gem install activesupport -v '5.1.2'` succeeds before bundling.
またエラーが・・・。”activesupport”がRuby2.2.2以上を要求していますね・・・。確か現環境Rubyのバージョンは・・・
bash-4.2# ruby --version ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-linux]
・・・。
<2017/7/30追記>
bash-4.2# RAILS_ENV=production bundle exec rake redmine:plugins:migrate bash-4.2# exit
<2017/7/30追記>
$ sudo /opt/bitnami/ctlscript.sh restart
まとめ
Bitnami Redmine Stackで使用しているRubyのバージョンが古いせいで、このままでは『Redmine Issues Tree』プラグインをインストールできないことがわかりました。現在対策を検討中です。と言っても、Bitinami Redmine Stackで使っているRubyのバージョンを上げるのは現実的ではないし、どうしたもんかなという感じです。
と言うわけで、Bitnami Redmine 3.3.2でも問題なく『Redmine Issues Tree』をインストールすることが出来ました。すべては私の無知のせいで嘘情報を発信してしまい非常に反省しております。今後はこのようなことが出来るだけ無いように努めたいと思います。
さて、今回の話をまとめると『Redmine Issues Tree』をインストールする際には以下の2点に十分に注意する必要があるということになります。
- Redmineのバージョンに対応したブランチからプラグインをダウンロードする
- “bundle install”のオプションに”–no-deployment”を指定する
関連記事

コメント