プロジェクト

全般

プロフィール

Vote #81888

未完了

Redmine does not start when installed --without markdown

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Confirmed
優先度:
通常
担当者:
-
カテゴリ:
Gems support_45
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
45
version_id:
178
issue_org_id:
36892
author_id:
2784
assigned_to_id:
0
comments:
2
status_id:
9
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
155
ステータス-->[Confirmed]

説明

When installing Redmine 5.0.0 with

bundle install --without markdown

it fails with the following stack trace:

A formatter class is required
~/redmine-5.0.0/lib/redmine/wiki_formatting.rb:45:in `register'
~/redmine-5.0.0/lib/redmine/preparation.rb:400:in `block in prepare'
~/redmine-5.0.0/lib/redmine/wiki_formatting.rb:31:in `map'
~/redmine-5.0.0/lib/redmine/preparation.rb:396:in `prepare'
~/redmine-5.0.0/config/initializers/30-redmine.rb:11:in `block in '
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:427:in `instance_exec'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:427:in `block in make_lambda'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:603:in `catch'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:603:in `block in default_terminator'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:199:in `block in halting'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:512:in `block in invoke_before'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:512:in `each'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:512:in `invoke_before'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/callbacks.rb:105:in `run_callbacks'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/reloader.rb:88:in `prepare!'
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/application/finisher.rb:124:in `block in '
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `instance_exec'
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `run'
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/initializable.rb:61:in `block in run_initializers'
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/initializable.rb:60:in `run_initializers'
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/application.rb:391:in `initialize!'
~/redmine-5.0.0/config/environment.rb:16:in `'
~/.gem/ruby/2.7.5/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
~/.gem/ruby/2.7.5/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `block in require'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:299:in `load_dependency'
~/.gem/ruby/2.7.5/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `require'
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/application.rb:367:in `require_environment!'
~/.gem/ruby/2.7.5/gems/railties-6.1.4.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
~/.gem/ruby/2.7.5/gems/rake-13.0.6/exe/rake:27:in `'
~/.gem/ruby/2.7.5/bin/bundle:25:in `load'
~/.gem/ruby/2.7.5/bin/bundle:25:in `
' Tasks: TOP => db:migrate => db:load_config => environment

Although the @redcarpet@ gem is not a strict requirement with the @commonmark@ gem, in Redmine it is currently required by the @CommonMark@ formatter because @Redmine::WikiFormatting::CommonMark::Formatter < Redmine::WikiFormatting::Markdown::Formatter@. The file where the Markdown formatter is defined, namely @lib/redmine/wiki_formatting/markdown/formatter.rb@ however defines a sub-class of a Redcloth class. This fails without Redcloth being available.

To solve this, we could either:

  • include redcloth in the common_mark group in the @Gemfile@
  • or extract the markdown parts into different files / modules so that the common_mark stuff can be loaded without Redcloth being present.

journals

--------------------------------------------------------------------------------
Holger Just wrote:
>
> To solve this, we could either:
>
> * include redcloth in the common_mark group in the @Gemfile@
> * or extract the markdown parts into different files / modules so that the common_mark stuff can be loaded without Redcloth being present.

I think the second option sounds better.

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

Admin Redmine さんが約2年前に更新

  • カテゴリGems support_45 にセット
  • 対象バージョン5.0.1_178 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0