Redmine4.2 の仮想VMにプラグインを入れようとするもPsych::SyntaxError

227 views
Skip to first unread message

きやす

unread,
Jun 13, 2021, 11:25:49 PM6/13/21
to Redmine Users (japanese)
Redmine4.2のVMイメージをVirtualboxで運用しようと思い、インストールしてプラグインを入れようとしています。
プラグインを有効化すべく、"bundle exec rake redmine:plugins:migrate RAILS_ENV=production"コマンドを発行したのですが、Psych::SyntaxErrorと表示されて有効化できません。

詳細はQiitaのほうにもログを載せているのですが、どのように解決したらよいか、どなたかアドバイスを頂けないでしょうか。

きやす

unread,
Jun 13, 2021, 11:27:04 PM6/13/21
to Redmine Users (japanese)
Qiitaのほうに誘導するつもりはないので、以下に出力されたログを記載しておきます。

bitnami@debian:~/htdocs/plugins$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production --trace
(in /opt/bitnami/apps/redmine/htdocs)
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 216 column 3
/opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:456:in `parse'
/opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:456:in `parse_stream'
/opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:390:in `parse'
/opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:277:in `load'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:95:in `load_from_yaml'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:45:in `load'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:76:in `[]'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/thumbnail.rb:26:in `<module:Thumbnail>'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/thumbnail.rb:23:in `<module:Redmine>'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/thumbnail.rb:22:in `<top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/opt/bitnami/apps/redmine/htdocs/lib/redmine.rb:51:in `<top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/opt/bitnami/apps/redmine/htdocs/config/initializers/30-redmine.rb:7:in `<top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:285:in `load'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:285:in `block in load'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:285:in `load'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/engine.rb:663:in `block in load_config_initializer'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/activesupport-5.2.5/lib/active_support/notifications.rb:170:in `instrument'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/engine.rb:662:in `load_config_initializer'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/engine.rb:619:in `each'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/engine.rb:619:in `block in <class:Engine>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/initializable.rb:32:in `instance_exec'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/initializable.rb:32:in `run'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/initializable.rb:61:in `block in run_initializers'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/initializable.rb:50:in `each'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/initializable.rb:50:in `tsort_each_child'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:415:in `call'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:415:in `each_strongly_connected_component_from'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:347:in `each'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:347:in `call'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
/opt/bitnami/ruby/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/initializable.rb:60:in `run_initializers'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/application.rb:361:in `initialize!'
/opt/bitnami/apps/redmine/htdocs/config/environment.rb:16:in `<top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/application.rb:337:in `require'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/application.rb:337:in `require_environment!'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `each'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:241:in `each'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:241:in `invoke_prerequisites'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `each'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:83:in `block in run'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/lib/rake/application.rb:80:in `run'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/opt/bitnami/ruby/bin/rake:23:in `load'
/opt/bitnami/ruby/bin/rake:23:in `<top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/cli/exec.rb:63:in `load'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/cli/exec.rb:63:in `kernel_load'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/cli/exec.rb:28:in `run'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/cli.rb:476:in `exec'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/cli.rb:30:in `dispatch'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/cli.rb:24:in `start'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/exe/bundle:46:in `block in <top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/opt/bitnami/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/exe/bundle:34:in `<top (required)>'
/opt/bitnami/ruby/bin/bundle:23:in `load'
/opt/bitnami/ruby/bin/bundle:23:in `<main>'
Tasks: TOP => redmine:plugins:migrate => environment
bitnami@debian:~/htdocs/plugins$ bundle exec rake db:migrate
(in /opt/bitnami/apps/redmine/htdocs)
rake aborted!
Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 216 column 3
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:95:in `load_from_yaml'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:45:in `load'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:76:in `[]'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/thumbnail.rb:26:in `<module:Thumbnail>'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/thumbnail.rb:23:in `<module:Redmine>'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/thumbnail.rb:22:in `<top (required)>'
/opt/bitnami/apps/redmine/htdocs/lib/redmine.rb:51:in `<top (required)>'
/opt/bitnami/apps/redmine/htdocs/config/initializers/30-redmine.rb:7:in `<top (required)>'
/opt/bitnami/apps/redmine/htdocs/config/environment.rb:16:in `<top (required)>'
/opt/bitnami/ruby/bin/bundle:23:in `load'
/opt/bitnami/ruby/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)


2021年6月14日月曜日 12:25:49 UTC+9 きやす:

Y Yoshihiro

unread,
Jun 14, 2021, 9:20:49 AM6/14/21
to Redmine Users (japanese)

bundleの実行パスに間違いはないでしょうか。

view_customizeのinstallを読むと、プラグイン導入後に
cd ../ で階層を移動してからbundleと記載されています。


cd {RAILS_ROOT}/plugins
cd ../
bundle install --without development test
bundle exec rake redmine:plugins:migrate RAILS_ENV=production

2021年6月14日月曜日 12:25:49 UTC+9 きやす:
Redmine4.2のVMイメージをVirtualboxで運用しようと思い、インストールしてプラグインを入れようとしています。

きやす

unread,
Jun 16, 2021, 2:30:26 AM6/16/21
to Redmine Users (japanese)
ありがとうございます。
cd ..してから実行しても同じ結果となります

bitnami@debian:/opt/bitnami/apps/redmine/htdocs$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 216 column 3
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:95:in `load_from_yaml'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:45:in `load'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:76:in `[]'
/opt/bitnami/apps/redmine/htdocs/lib/redmine/thumbnail.rb:26:in `<module:Thumbnail>'
(以下略)

2021年6月14日月曜日 22:20:49 UTC+9 yoshihir...@gmail.com:

前田剛

unread,
Jun 17, 2021, 12:54:11 AM6/17/21
to redmine-...@googlegroups.com
前田といいます。

On Mon, Jun 14, 2021 at 12:25 PM きやす <kiya...@gmail.com> wrote:
> Redmine4.2のVMイメージをVirtualboxで運用しようと思い、インストールしてプラグインを入れようとしています。
> プラグインを有効化すべく、"bundle exec rake redmine:plugins:migrate RAILS_ENV=production"コマンドを発行したのですが、Psych::SyntaxErrorと表示されて有効化できません。

プラグインの問題ではなく、Redmineの config/configuration.yml の問題のような気がします。

> Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 216 column 3
> /opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:456:in `parse'
> /opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:456:in `parse_stream'
> /opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:390:in `parse'
> /opt/bitnami/ruby/lib/ruby/2.6.0/psych.rb:277:in `load'
> /opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:95:in `load_from_yaml'
> /opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:45:in `load'
> /opt/bitnami/apps/redmine/htdocs/lib/redmine/configuration.rb:76:in `[]'

以下のようなエラーが出るのは configuration.yml の読み込みに失敗したときです。おそらく何か形式上の誤りがあるのだと思います。

Redmineのインストールディレクトリの config/configuration.yml
の前後5行くらい(例えば210行から220行あたりまで)を見せてもらうとなにか分かるかもしれません。

安田清人

unread,
Jun 17, 2021, 4:06:26 AM6/17/21
to redmine-...@googlegroups.com
前田さま

ありがとうございます。
形式上の疑い、ということでこちらでタブ文字も探してみましたがタブもありませんでした。

configuration.ymlのhead と tail の結果です。

------------------------------------------------
bitnami@debian:~/htdocs/config$ cat configuration.yml | head 20
head: cannot open '20' for reading: No such file or directory
bitnami@debian:~/htdocs/config$ cat configuration.yml | head -20
# = Redmine configuration file
#
# Each environment has its own configuration options.  If you are only
# running in production, only the production block needs to be configured.
# Environment specific configuration options override the default ones.
#
# Note that this file needs to be a valid YAML file.
# DO NOT USE TABS! Use 2 spaces instead of tabs for indentation.

# default configuration options for all environments
default:
  # Outgoing emails configuration
  # See the examples below and the Rails guide for more configuration options:
  # http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
  email_delivery:
    delivery_method: :smtp
    smtp_settings:

      address:
      port: 587

------------------------------------------------
bitnami@debian:~/htdocs/config$ cat configuration.yml | tail -20

  # URL of the avatar server
  #
  # By default, Redmine uses Gravatar as the avatar server for displaying
  # user icons. You can switch to another Gravatar-compatible server such
  # as Libravatar and opensource servers listed on
  # https://wiki.libravatar.org/running_your_own/
  #
  # URL of each avatar is: #{avatar_server_url}/avatar/#{hash}
  #
  #avatar_server_url: https://www.gravatar.com        # default
  #avatar_server_url: https://seccdn.libravatar.org

# specific configuration options for production environment
# that overrides the default ones
production:

# specific configuration options for development environment
# that overrides the default ones
development:

------------------------------------------------

以上です。

2021年6月17日(木) 13:54 前田剛 <ma...@farend.jp>:
--
このメールは Google グループのグループ「Redmine Users (japanese)」の登録者に送られています。
このグループから退会し、グループからのメールの配信を停止するには redmine-users-...@googlegroups.com にメールを送信してください。
このディスカッションをウェブ上で閲覧するには、https://groups.google.com/d/msgid/redmine-users-ja/CALXUZfjkCpRPTvaR8XCUx9Y837th48N-5LE2F49Qu0z5x3mnQQ%40mail.gmail.com にアクセスしてください。

安田清人

unread,
Jun 17, 2021, 4:51:59 AM6/17/21
to redmine-...@googlegroups.com
すみません、本件ですが、改めVMのインストールからやり直したらうまくいきました。
私自身が作業の中で変なオペレーションをしていたのか
何かのモジュールがアップデートされたのか
原因はつかめないままですが。。

ご協力いただきました

Y Yoshihiroさま、前田剛さま

ありがとうございました。

2021年6月17日(木) 17:06 安田清人 <kiya...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages