LoginSignup
6
13

More than 5 years have passed since last update.

bitnami Redmine、Windows版オフライン環境での構築後にプラグインインストール

Last updated at Posted at 2019-05-01

再びRuby on Railsのオフライン環境での構築の続き

プラグインインストール

前回のbitnami Redmine、Windows版をオフラインでインストールするから、同じくオフライン環境でプラグインインストールを試してみました。

今回試しに「View customize plugin」をインストールしてみました。

検証環境

前回と同様ですので、一部補足を除いて簡単に書きます。詳細は前回の記事をご覧ください。

OS、アプリケーション、LAN設定

・Windows Server 2012R2(Oracle VirtualBox6.0.6r上、ブリッジモード) → インストール開始前に戻しやすくするためにスナップショットを取ってます
・bitnami Redmine 4.0.3-2 (2019/4/30現在最新)
・redmine-view-customize v2.1.0(2019/5/1現在最新)
・LANの設定で、IPアドレスはDHCPだがDNSの箇所だけDNSサーバとして存在しない固定アドレスを振ることで名前解決を出来なくしてます。検証のために、インターネット接続を止めています。

hosts書き換え

hostsを以下のように変更

127.0.0.1   repo.msys2.org

→今回必要か分かりませんが、念のため

「View customize plugin」のインストール

インストールの前に

オンライン環境とのgemファイルの差

C:\Bitnami\redmine-4.0.3-2\apps\redmine\htdocs\vendor\cache
の内容を、オンラインでプラグインインストール出来ている環境と、オフラインでプラグインインストール前と比較すると

activerecord-compatible_legacy_migration-0.1.1.gem

のみ足りませんでした(細かいですが、オンライン環境の方はRubyフォルダが作成されています)

オンライン環境で構築出来ているなら、上記「activerecord-compatible_legacy_migration-0.1.1.gem」をオフライン環境の

C:\Bitnami\redmine-4.0.3-2\apps\redmine\htdocs\vendor\cache
にコピーする
2019-05-01_10.39.31.png
2019-05-01_10.39.53.png
オンライン環境で構築していないなら、activerecord-compatible_legacy_migration 0.1.1で右下の「リンク集→ダウンロード」でダウンロードできそう。
2019-05-01_11.27.45.png

プラグインダウンロード

redmine-view-customizeから、今回v2.1.0のSource code(zip)をダウンロードして解凍

解凍したファイルをディレクトリごとコピー

【Windows】RedmineにEasy Ganttプラグインなどをインストールしてみたを参照して、

C:\Bitnami\redmine-4.0.3-2\apps\redmine\htdocs\plugins

上に、解凍したファイルをディレクトリごとコピー

2019-05-01_10.13.40.png
コピー後、フォルダ名「view_customize」に変更。
2019-05-01_10.21.29.png

インストールコマンド実行

【Windows】RedmineにEasy Ganttプラグインなどをインストールしてみた→導入方法

通りに実行、と言いたいのですがWindows Server 2012R2だとスタートメニューを開くのが面倒なので、手順を記載。

Windows Server 2012 スタートメニューの利用方法通りに、

「スタート」をクリックする
2019-05-01_11.55.31.png
「↓」をクリックする
2019-05-01_11.57.01.png
「Bitami Redmine Stack」の「Bitani Redmine Stackを使用する」をクリックする
2019-05-01_11.58.30.png

このままオンライン状態と同じようにインストールしようとすると、以下のエラーメッセージが出るので、

C:\Bitnami\redmine-4.0.3-2\apps\redmine\htdocs>bundle install --without development test postgresql sqlite xapian
Fetching source index from https://rubygems.org/

Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs fr
om https://rubygems.org/
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs fr
om https://rubygems.org/
Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Could not fetch specs from https://rubygems.org/

C:\Bitnami\redmine-4.0.3-2\apps\redmine\htdocs>bundle exec rake redmine:plugins:
migrate RAILS_ENV=production
Could not find gem 'activerecord-compatible_legacy_migration x64-mingw32' in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.
Run `bundle install` to install missing gems.

bundle installをオフラインで実行するメモ

を参照にして、

cd apps\redmine\htdocs
bundle install  --path vendor/bundle --local
bundle exec rake redmine:plugins:migrate RAILS_ENV=production

実行結果

C:\Bitnami\redmine-4.0.3-2\apps\redmine\htdocs>bundle install  --path vendor/bundle --local
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.7.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2.1
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.2 (x64-mingw32)
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Using actionview 5.2.2.1
Using rack 2.0.7
Using rack-test 1.1.0
Using actionpack 5.2.2.1
Using nio4r 2.3.1 (x64-mingw32)
Using websocket-extensions 0.1.3
Using websocket-driver 0.7.0 (x64-mingw32)
Using actioncable 5.2.2.1
Using globalid 0.4.2
Using activejob 5.2.2.1
Using mini_mime 1.0.1
Using mail 2.7.1
Using actionmailer 5.2.2.1
Using method_source 0.9.2
Using thor 0.20.3
Using railties 5.2.2.1
Using actionpack-xml_parser 2.0.1
Using activemodel 5.2.2.1
Using arel 9.0.0
Using activerecord 5.2.2.1
Installing activerecord-compatible_legacy_migration 0.1.1
Using mimemagic 0.3.3
Using marcel 0.3.3
Using activestorage 5.2.2.1
Using public_suffix 3.0.3
Using addressable 2.6.0
Using bundler 1.16.6
Using css_parser 1.7.0
Using csv 3.0.9
Using daemons 1.3.1
Using eventmachine 1.2.7 (x64-mingw32)
Using htmlentities 4.3.4
Using mysql2 0.5.2 (x64-mingw32)
Using net-ldap 0.16.1
Using ruby-openid 2.3.0
Using rack-openid 1.4.2
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 5.2.2.1
Using rbpdf-font 1.19.1
Using rbpdf 1.19.8
Using redcarpet 3.4.0 (x64-mingw32)
Using request_store 1.0.5
Using rmagick 2.15.4 (x64-mingw32)
Using roadie 3.4.0
Using roadie-rails 1.3.0
Using rouge 3.3.0
Using thin 1.7.2 (x64-mingw32)
Using tzinfo-data 1.2019.1
Updating files in vendor/cache
Bundle complete! 29 Gemfile dependencies, 64 gems now installed.
Gems in the groups development, test, postgresql, sqlite and xapian w
talled.
Bundled gems are installed into `./vendor/bundle`
C:\Bitnami\redmine-4.0.3-2\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production
== 1 CreateViewCustomizes: migrating =================
-- adapter_name()
   -> 0.0001s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:view_customizes, {:options=>"ENGINE=I
   -> 0.1285s
== 1 CreateViewCustomizes: migrated (0.1327s) ========

== 2 AddColumnViewCustomizes: migrating ==============
-- add_column(:view_customizes, :is_enabled, :boolean,
true})
   -> 0.0715s
-- add_column(:view_customizes, :is_private, :boolean,
false})
   -> 0.0741s
-- add_column(:view_customizes, :author_id, :integer,
})
   -> 0.0413s
== 2 AddColumnViewCustomizes: migrated (0.1927s) =====

== 3 AddInsertionPositionToViewCustomizes: migrating =
-- add_column(:view_customizes, :insertion_position, :
fault=>"html_head"})
   -> 0.0747s
-- rename_column(:view_customizes, :customize_type, :c
   -> 0.0121s
-- add_column(:view_customizes, :customize_type, :stri
t=>"javascript"})
   -> 0.0874s
-- remove_column(:view_customizes, :customize_type_old
   -> 0.0406s
-- change_column_null(:view_customizes, :path_pattern,
   -> 0.0455s
-- change_column_null(:view_customizes, :code, false)
   -> 0.1825s
== 3 AddInsertionPositionToViewCustomizes: migrated (0

== 4 AddCommentsToViewCustomizes: migrating ==========
-- add_column(:view_customizes, :comments, :string, {:
   -> 0.0396s
== 4 AddCommentsToViewCustomizes: migrated (0.0410s) =

== 5 ChangeCodeLimitOnViewCustomizes: migrating ======
-- adapter_name()
   -> 0.0000s
-- change_column(:view_customizes, :code, :text, {:lim
   -> 0.0554s
== 5 ChangeCodeLimitOnViewCustomizes: migrated (0.0579

うまく行ったっぽい。

bitnamiサービスの再起動

またWindowsServer2012R2だと面倒ですが、「Bitnami Redmine Stack Manager Tool」を起動
2019-05-01_11.59.37.png
サービスを「Restart All」ですべて再起動
2019-05-01_12.01.05.png
サービスがすべて起動されていることを確認
2019-05-01_11.06.08.png
「Launch Bitnami Redmine Stack」を起動して管理画面を表示
2019-05-01_12.02.37.png
ログインして、「表示のカスタマイズ」(「View customize plugin」の日本語表示)が出ていることを確認。
2019-05-01_12.05.05.png

まとめ

一度プラグインインストールまで出来ていたので、上記記事を書くのは簡単かと思っていましたが、結構忘れていて他者様のサイトを改めてググって見つけたりしました。まとめることで、自分の中が整理出来ました。

また、一度オンライン環境で構築出来ている環境を作った方が「何をもって正の環境であるか」が分かるので、オンラインの検証環境は別途必要です。

今回は、自分が使い慣れているOracle VirtualboxでWindowsServer2012R2は試用版をダウンロードして構築してみました。

合わせてWindowsServer2012R2の操作はスタートメニューの表示が一画面で終わらないので、今回ちょっとつまずきました。その内容をここに記載しました。

6
13
0

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
6
13