LoginSignup
14
20

More than 3 years have passed since last update.

bitnami redmineにpluginを追加する

Posted at

はじめに

bitnamiのredmineにpluginをインストールした際にちょっと、pluginのgitに記載されている手順と違ったのでメモついでに書いておきます。
また、今回インストールを行ったのはredmine-view-customizeという「redmineの画面をCSSやJavascriptを使ってカスタマイズするプラグイン」となります。

手順

今回はbitnamiのため、以下のパスにpluginを配置する必要があります。

pluginダウンロード
$ cd /opt/bitnami/apps/redmine/htdocs/plugins/

$ git clone https://github.com/onozaty/redmine-view-customize.git view_customize
Cloning into 'view_customize'...
remote: Enumerating objects: 52, done.
remote: Counting objects: 100% (52/52), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 713 (delta 14), reused 38 (delta 8), pack-reused 661
Receiving objects: 100% (713/713), 434.70 KiB | 681.00 KiB/s, done.
Resolving deltas: 100% (283/283), done.
bundleインストール
$ cd ../

$ bundle install --without development test
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 /opt/bitnami/apps/redmine/htdocs/Gemfile freeze 
by running `bundle install --no-deployment`.

The dependencies in your gemfile changed

You have added to the Gemfile:
* activerecord-compatible_legacy_migration

pluginのページではbundle install --without development testと記載ありましたがこれだとインストールできませんでした。
どうやらGemfile.lockというファイルでbundleインストールしたバージョンがトラックされているのが原因のようです。
とりあえず、出力内容に記載のbundle install --no-deploymentコマンドを実行します。

Gemfile.lock
$ ls /opt/bitnami/apps/redmine/htdocs/Gemfile.lock 
/opt/bitnami/apps/redmine/htdocs/Gemfile.lock
install
$ bundle install --no-deployment
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
rake
$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production
Rails Error: Unable to access log file. Please ensure that /opt/bitnami/apps/redmine/htdocs/log/production.log exists and is writable (ie, make it writable for user and group: chmod 0664 /opt/bitnami/apps/redmine/htdocs/log/production.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
Migrating to CreateViewCustomizes (1)

無事インストールできたら再起動して完了です。

redmine再起動
$ sudo /opt/bitnami/ctlscript.sh restart
/opt/bitnami/subversion/scripts/ctl.sh : subversion stopped
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
/opt/bitnami/php/scripts/ctl.sh : php-fpm stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql  started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
/opt/bitnami/subversion/scripts/ctl.sh : subversion started at port 3690

確認

pluginが追加されていることを確認できます。
スクリーンショット 2020-01-14 11.36.17.png

おわりに

redmineのpluginはたくさんあるので上手く使っていきたいと思います。

参考
https://bundler.io
https://github.com/rubygems/bundler

14
20
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
20