easy guntt の導入

Table of Contents

  1. easy guntt の導入:REDMINE:

easy guntt の導入 :REDMINE:

個人用タスクや個人用プロジェクト管理のために私はローカルPCで Bitnami Redmine を使っています。今回はこれにプラグインである easy guntt をイン ストールします。プロキシ設定が必要なPCへのインストールなのでハードルが 少しあがります。

 プラグインは入手成功。

参考: https://qiita.com/yaju/items/76f465a03a2b22a5715b

これに従ってインストールすると、以下のエラーが発生。

> C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>bundle install --without development test postgresql sqlite xapian
> [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test postgresql sqlite xapian'`, and stop using this flag
> Fetching source index from https://rubygems.org/
> 
> Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
> 
> Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from 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.2.2-1\apps\redmine\htdocs>

https 通信か・・・。プロキシ経由で接続しているのでそのあたりが問題かも。

気を取り直して環境を変えて、マニュアル通りの ”bundle exec rake redmine:plugins:migrate RAILS_ENV=productio” を実行してみます。

参考: https://www.redmine.org/projects/redmine/wiki/Plugins?utm_source=newsletter&utm_medium=email&utm_campaign=TRG_1801-gantt-01-installation-package-eng

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>ls
CONTRIBUTING.md  README.rdoc  appveyor.yml  config.ru  extra  log           public  vendor
Gemfile          Rakefile     bin           db         files  package.json  test    yarn.lock
Gemfile.lock     app          config        doc        lib    plugins       tmp

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=productio
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': Interrupt
    from C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean.rb:2:in `<top (required)>'
    from C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from <internal:gem_prelude>:5:in `<internal:gem_prelude>'
バッチ ジョブを終了しますか (Y/N)? bundle exec rake redmine:plugins:migrate RAILS_ENV=production
バッチ ジョブを終了しますか (Y/N)? y

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production
Could not find gem 'redmine_extensions 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.

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 13.0.6
Using concurrent-ruby 1.1.9
Using i18n 1.8.10
Using minitest 5.14.4
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 5.2.6
Using builder 3.2.4
Using erubi 1.10.0
Using racc 1.5.2 (x64-mingw32)
Using nokogiri 1.11.7 (x64-mingw32)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.11.0
Using rails-html-sanitizer 1.3.0
Using actionview 5.2.6
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 5.2.6
Using nio4r 2.5.7 (x64-mingw32)
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.5 (x64-mingw32)
Using actioncable 5.2.6
Using globalid 0.5.2
Using activejob 5.2.6
Using mini_mime 1.0.3
Using mail 2.7.1
Using actionmailer 5.2.6
Using method_source 1.0.0
Using thor 1.1.0
Using railties 5.2.6
Using actionpack-xml_parser 2.0.1
Using activemodel 5.2.6
Using arel 9.0.0
Using activerecord 5.2.6
Using marcel 1.0.1
Using activestorage 5.2.6
Using public_suffix 4.0.6
Using addressable 2.8.0
Using bundler 2.1.2
Using chunky_png 1.4.0
Using css_parser 1.10.0
Using csv 3.1.9
Using daemons 1.4.0
Using eventmachine 1.2.7 (x64-mingw32)
Using htmlentities 4.3.4
Using mini_magick 4.11.0
Using mysql2 0.5.3 (x64-mingw32)
Using net-ldap 0.17.0
Using ruby-openid 2.9.2
Using rack-openid 1.4.2
Using sprockets 4.0.2
Using sprockets-rails 3.2.2
Using rails 5.2.6
Using rbpdf-font 1.19.1
Using rbpdf 1.20.1
Using redcarpet 3.5.1 (x64-mingw32)
Fetching redmine_extensions 0.4.3
Installing redmine_extensions 0.4.3
Using request_store 1.5.0
Using roadie 4.0.0
Using roadie-rails 2.2.0
Using rotp 6.2.0
Using rouge 3.26.0
Using rqrcode_core 1.1.0
Using rqrcode 2.0.0
Using rubyzip 2.3.2
Using thin 1.8.0 (x64-mingw32)
Using tzinfo-data 1.2021.1
Updating files in vendor/cache
  * redmine_extensions-0.4.3.gem
Bundle complete! 37 Gemfile dependencies, 68 gems now installed.
Gems in the groups development, test, postgresql, sqlite and xapian were not installed.
Bundled gems are installed into `./vendor/bundle`

 インストールはできたが、下記メッセージが表示されて結局使えませんでした。

Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

 ログを見ると、インストール時にエラーが出ているのがわかります。

ActionView::Template::Error (Mysql2::Error: Table 'bitnami_redmine.easy_settings' doesn't exist: SHOW FULL FIELDS FROM `easy_settings`):

<file:///c:/Bitnami/redmine-4.2.2-1/apps/redmine/htdocs/log/production.log>

 以下をみると MySQL の DB が未処理(?)になっているのが原因らしいです。

参考: https://blog.goo.ne.jp/system-oni800/e/4667a50f2dac8cf8e43627052c850612 参考: https://qiita.com/kazu_kazu/items/6aa3de08b72a099388dc

 上記の内容に沿って、Bitnami Redmine Stack Enviroment で以下のコマンドを実行してみます。

rake --trace db:migrate RAILS_ENV=production

・・・途中で終了してしまった。

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>rake --trace db:migrate RAILS_ENV=production
rake aborted!
Gem::LoadError: You have already activated rake 12.3.3, but your Gemfile requires rake 13.0.6. Prepending `bundle exec` to your command may solve this.
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:312:in `check_for_activated_spec!'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:31:in `block in setup'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/spec_set.rb:147:in `each'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/spec_set.rb:147:in `each'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:26:in `map'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:26:in `setup'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler.rb:149:in `setup'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/setup.rb:10:in `block in <top (required)>'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/ui/shell.rb:136:in `with_level'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/ui/shell.rb:88:in `silence'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/setup.rb:10:in `<top (required)>'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Bitnami/redmine-4.2.2-1/apps/redmine/htdocs/config/boot.rb:8:in `<top (required)>'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Bitnami/redmine-4.2.2-1/apps/redmine/htdocs/config/application.rb:3:in `<top (required)>'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Bitnami/redmine-4.2.2-1/apps/redmine/htdocs/Rakefile:5:in `<top (required)>'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load_rakefile'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:703:in `raw_load_rakefile'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:104:in `block in load_rakefile'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:103:in `load_rakefile'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:82:in `block in run'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
C:/Bitnami/redmine-4.2.2-1/ruby/lib/ruby/gems/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
C:/Bitnami/redmine-4.2.2-1/ruby/bin/rake:23:in `load'
C:/Bitnami/redmine-4.2.2-1/ruby/bin/rake:23:in `<main>'

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>

出力されたメッセージをみると、

rake aborted!
Gem::LoadError: You have already activated rake 12.3.3, but your Gemfile requires rake 13.0.6. Prepending `bundle exec` to your command may solve this.

と書いてあるので、

rake –trace db:migrate RAILS_ENV=production

としてやり直してみます。うまくいったっぽいので再起動(Bitnami Redmine Stack を restart all)します。

これでようやくうまくいきました。

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>bundle exec rake --trace db:migrate RAILS_ENV=production
** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:migrate
== 20150705172511 CreateEasySettings: migrating ===============================
-- table_exists?(:easy_settings)
   -> 0.0020s
-- create_table(:easy_settings, {:options=>"ENGINE=InnoDB", :id=>:integer})
   -> 0.0467s
-- index_exists?(:easy_settings, [:name, :project_id], {:unique=>true, :name=>"index_easy_settings_on_name_and_project_id"})
   -> 0.0104s
-- add_index(:easy_settings, [:name, :project_id], {:unique=>true})
   -> 0.0280s
== 20150705172511 CreateEasySettings: migrated (0.0958s) ======================

== 20160519161300 CreateEntityAssignments: migrating ==========================
-- table_exists?(:easy_entity_assignments)
   -> 0.0014s
-- create_table(:easy_entity_assignments, {:options=>"ENGINE=InnoDB", :id=>:integer})
   -> 0.0434s
-- add_index(:easy_entity_assignments, [:entity_from_type, :entity_from_id, :entity_to_type, :entity_to_id], {:name=>"entity_assignment_idx", :unique=>true})
   -> 0.0247s
-- add_index(:easy_entity_assignments, :entity_from_id, {:name=>"entity_assignment_idx_from"})
   -> 0.0273s
-- add_index(:easy_entity_assignments, :entity_to_id, {:name=>"entity_assignment_idx_to"})
   -> 0.0224s
== 20160519161300 CreateEntityAssignments: migrated (0.1260s) =================

== 20190206121100 RemoveForeignKeyFromEasySettings: migrating =================
-- remove_foreign_key(:easy_settings, :projects)
   -> 0.0164s
== 20190206121100 RemoveForeignKeyFromEasySettings: migrated (0.0173s) ========

** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke db:load_config
** Execute db:schema:dump

C:\Bitnami\redmine-4.2.2-1\apps\redmine\htdocs>