Project

General

Profile

Error with redmine 5.0.2 on FreeBSD 13.1 amd64 :: Redmine::WikiFormatting::CommonMark::HTML (NameError)

Added by Юрий Долгорукий over 1 year ago

Hi friends!

I have a fresh FreeBSD 13.1 amd64 installation, and try to get redmine 5.0.2 get running.
After all installation steps get error. Please help to solve that trouble!

Here is detailed information:

Detailed info
Ruby: ruby-2.7.6_2,1
Rails: 6.1.6
OS: FreeBSD bsd-clean 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64
DB: mariadb106-server-10.6.8
WEB-Server: Nginx with Passenger module.

RAILS_ENV=production ruby bin/about gets also similar error:
Traceback (most recent call last):
35: from bin/about:4:in `<main>'
34: from /usr/local/lib/ruby/site_ruby/2.7/rubygems/core_ext/kernel_require.rb:85:in `require'
33: from /usr/local/lib/ruby/site_ruby/2.7/rubygems/core_ext/kernel_require.rb:85:in `require'
32: from /usr/local/www/redmine/config/environment.rb:16:in `<top (required)>'
31: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/railties-6.1.6/lib/rails/application.rb:391:in `initialize!'
30: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/railties-6.1.6/lib/rails/initializable.rb:60:in `run_initializers'
29: from /usr/local/lib/ruby/2.7/tsort.rb:205:in `tsort_each'
28: from /usr/local/lib/ruby/2.7/tsort.rb:226:in `tsort_each'
27: from /usr/local/lib/ruby/2.7/tsort.rb:347:in `each_strongly_connected_component'
26: from /usr/local/lib/ruby/2.7/tsort.rb:347:in `call'
25: from /usr/local/lib/ruby/2.7/tsort.rb:347:in `each'
24: from /usr/local/lib/ruby/2.7/tsort.rb:349:in `block in each_strongly_connected_component'
23: from /usr/local/lib/ruby/2.7/tsort.rb:431:in `each_strongly_connected_component_from'
22: from /usr/local/lib/ruby/2.7/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
21: from /usr/local/lib/ruby/2.7/tsort.rb:228:in `block in tsort_each'
20: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/railties-6.1.6/lib/rails/initializable.rb:61:in `block in run_initializers'
19: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `run'
18: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `instance_exec'
17: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/railties-6.1.6/lib/rails/application/finisher.rb:133:in `block in <module:Finisher>'
16: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:318:in `eager_load_all'
15: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:318:in `each'
14: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:219:in `eager_load'
13: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:219:in `synchronize'
12: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:234:in `block in eager_load'
11: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:27:in `ls'
10: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:27:in `each'
9: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:41:in `block in ls'
8: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:239:in `block (2 levels) in eager_load'
7: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:127:in `cget'
6: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:127:in `const_get'
5: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:27:in `require'
4: from /usr/local/www/redmine/vendor/bundle/ruby/2.7/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:27:in `require'
3: from /usr/local/www/redmine/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb:22:in `<top (required)>'
2: from /usr/local/www/redmine/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb:23:in `<module:Redmine>'
1: from /usr/local/www/redmine/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb:24:in `<module:WikiFormatting>'
/usr/local/www/redmine/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb:27:in `<module:CommonMark>': uninitialized constant Redmine::WikiFormatting::CommonMark::HTML (NameError)

So, after successfull installation, I try to open in browser: http://my.redmine, and get page with "_We're sorry, but something went wrong._"

nginx-error.log
@[ E 2022-07-08 11:56:57.8150 72637/Tm age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /usr/local/www/redmine: The application encountered the following error: uninitialized constant Redmine::WikiFormatting::CommonMark::HTML (NameError)
Error ID: 6bde302c
Error details saved to: /tmp/passenger-error-vVmxTL.html

[ E 2022-07-08 11:56:57.8177 72637/T8 age/Cor/Con/CheckoutSession.cpp:283 ]: [Client 1-3] Cannot checkout session because a spawning error occurred. The identifier of the error is 6bde302c. Please see earlier logs for details about the error.@

Also additional info about installed ruby-related packages:
pkg info | grep ruby
ruby-2.7.6_2,1 Object-oriented interpreted scripting language
ruby27-gems-3.3.17 Package management framework for the Ruby language
rubygem-actioncable61-6.1.6 Integrated WebSockets for Rails
rubygem-actionmailbox61-6.1.6 Receive and process incoming emails in Rails applications
rubygem-actionmailer61-6.1.6 Easy email delivery and testing for Ruby
rubygem-actionpack-xml_parser-rails61-2.0.1 XML parameters parser for Action Pack
rubygem-actionpack61-6.1.6 Action Controller and Action View of Rails MVC Framework
rubygem-actiontext61-6.1.6 Edit and display rich text in Rails applications
rubygem-actionview61-6.1.6 Rendering framework putting the V in MVC (part of Rails)
rubygem-activejob61-6.1.6 Job class declarations for a variety of queueing backends
rubygem-activemodel61-6.1.6 Toolkit for building modeling frameworks
rubygem-activerecord61-6.1.6 Object-relational mapping layer for Rails MVC Framework
rubygem-activestorage61-6.1.6 Attach cloud and local files in Rails applications
rubygem-activesupport61-6.1.6 Utility classes and extension that are required by Rails MVC Framework
rubygem-addressable-2.8.0 Replacement for the URI implementation
rubygem-bindex-0.8.1 Bindings for your Ruby exceptions
rubygem-bootsnap-1.12.0 Boot large ruby/rails apps faster
rubygem-builder-3.2.4 Facilitate programmatic generation of XML markup
rubygem-bundler-2.3.17,1 Tool that manages gem dependencies for Ruby applications
rubygem-byebug-11.1.3 Ruby 2 debugger
rubygem-capybara-3.37.1 Integration testing tool for rack based web applications
rubygem-childprocess-4.1.0 External background process controller
rubygem-chunky_png-1.4.0 Ruby library to read and write PNG images
rubygem-commonmarker-0.23.5 Ruby wrapper for libcmark (CommonMark parser)
rubygem-concurrent-ruby-1.1.10 Modern concurrency tools for Ruby
rubygem-crack-0.4.5 Ruby Library of Simple JSON and XML Parsing
rubygem-crass-1.0.6 CSS parser based on the CSS Syntax Level 3 draft
rubygem-css_parser-1.11.0 Set of classes for parsing CSS in Ruby
rubygem-csv-3.2.3 Interface to CSV files and data
rubygem-daemons-1.4.1 Toolkit to convert your script to a controllable daemon
rubygem-dalli-3.2.2 High performance memcached client for Ruby
rubygem-digest-3.1.0 Framework for message digest libraries
rubygem-erubi-1.10.0 ERB template engine for Ruby
rubygem-etc-1.3.0 Provide access to information typically stored in UNIX /etc directory
rubygem-eventmachine-1.2.7 Fast, simple event-processing library for Ruby programs
rubygem-execjs-2.8.1_2 ExecJS lets you run JavaScript code from Ruby
rubygem-ffi-1.15.5_1 Extension for dynamic libraries and binding functions
rubygem-globalid-rails61-1.0.0 URIs for your models makes it easy to pass references around
rubygem-hashdiff-1.0.1 Diff lib to compute the smallest difference between two hashes
rubygem-html-pipeline-2.13.2_1 GitHub HTML processing filters and utilities
rubygem-htmlentities-4.3.4 HTML entity encoding and decoding for Ruby
rubygem-i18n-1.10.0,2 New wave Internationalization support for Ruby
rubygem-image_processing-1.12.2 High-level wrapper for processing images for the web with ImageMagick or libvips
rubygem-jbuilder-rails61-2.11.5 Create JSON structures via a Builder-style DSL
rubygem-loofah-2.18.0 Library for manipulating HTML/XML documents and fragments
rubygem-mail-2.7.1_2,2 Ruby email handler
rubygem-marcel-1.0.2 Simple mime type detection
rubygem-matrix-0.4.2 Implementation of Matrix and Vector classes
rubygem-method_source-1.0.0 Tool to retrieve the sourcecode for a method
rubygem-mini_magick-4.11.0 Manipulate images with minimal use of memory via ImageMagick
rubygem-mini_mime-1.1.2 Lightweight mime type lookup toy
rubygem-mini_portile2-2.8.0 Simple autoconf builder for developers
rubygem-minitest-5.16.1 Minitest provides a complete suite of testing facilities
rubygem-msgpack-1.5.2 Gems for MessagePack
rubygem-mysql2-0.5.4 Simple, fast MySQL library for Ruby, binding to libmysql
rubygem-net-imap-0.2.3 Ruby client api for Internet Message Access Protocol
rubygem-net-pop-0.1.1_1 Ruby client library for POP3
rubygem-net-protocol-0.1.3 Abstruct interface for net-* client
rubygem-net-smtp-0.3.1 Simple Mail Transfer Protocol client library for Ruby
rubygem-nio4r-2.5.8 Cross-platform asynchronous I/O primitives
rubygem-nokogiri-1.13.6 HTML, XML, SAX, and Reader parser
rubygem-passenger-nginx-6.0.12_2 Modules for running Ruby on Rails and Rack applications
rubygem-pkg-config-1.4.7 pkg-config implementation for Ruby
rubygem-public_suffix-4.0.7_2 Ruby domain name parser based on the Public Suffix List
rubygem-puma-5.6.4 Fast, multithreaded and highly concurrent ruby web server
rubygem-racc-1.6.0 LALR(1) parser generator for Ruby
rubygem-rack-2.2.3.1,3 Rack, a Ruby Webserver Interface
rubygem-rack-proxy-0.7.2 Request/response rewriting proxy capabilities with streaming
rubygem-rack-test-1.1.0 Small, simple testing API for Rack apps
rubygem-rack16-1.6.13 Rack, a Ruby Webserver Interface
rubygem-rails-dom-testing-rails61-2.0.3 Analyse and compare DOMs using Nokogiri
rubygem-rails-html-sanitizer-1.4.3 Sanitize HTML fragments in Rails applications
rubygem-rails61-6.1.6 Full-stack web application framework
rubygem-railties61-6.1.6 Rails internals bootup, plugins, generators, and rake tasks
rubygem-rake-13.0.6 Ruby Make
rubygem-rbpdf-1.20.1 Ruby library for creating ERB enabled PDF templates
rubygem-rbpdf-font-1.19.1 RBPDF font files
rubygem-redcarpet-3.5.1 Fast, safe and extensible Markdown to (X)HTML parser
rubygem-regexp_parser-2.1.1 Tokenizing, lexinf and parsing Ruby regular expressions
rubygem-request_store-1.5.1 RequestStore gives you per-request global storage
rubygem-rexml-3.2.5 XML toolkit for Ruby
rubygem-roadie-5.0.1 Helper for generating HTML mails
rubygem-roadie-rails-rails61-3.0.0 Helper for generating HTML mails in Rails applications
rubygem-rotp-6.2.0 Ruby library for generating one time passwords
rubygem-rouge-3.29.0 Simple, easy-to-extend drop-in replacement for pygments
rubygem-rqrcode-0.10.1 Library for encoding QR Codes
rubygem-ruby-vips-2.1.4 Binding for the vips image processing library
rubygem-rubyzip-2.3.2 Ruby module for reading and writing zip files
rubygem-sass-rails-rails61-6.0.0 Sass adapter for the Rails asset pipeline
rubygem-sassc-rails-rails61-2.1.2 Integrate SassC-Ruby into Rails
rubygem-sassc22-2.2.1 Use libsass with Ruby
rubygem-selenium-webdriver-4.3.0 Tool for writing automated tests of websites
rubygem-semantic_range-3.0.0 Parse and compare semantic version numbers and ranges
rubygem-spring-4.0.0 Rails application preloader
rubygem-sprockets-rails-rails61-3.4.2 Sprockets Rails integration
rubygem-sprockets3-3.7.2 Ruby library that preprocesses and concatenates JavaScript files
rubygem-sqlite3-1.4.4 Ruby interface to the SQLite DB engine version 3
rubygem-strscan-3.0.3 Provide lexical scanning operations on a String
rubygem-thin-1.8.1 Fast and simple Ruby web server
rubygem-thor-1.2.1 Scripting framework that replaces rake, sake, and rubigen
rubygem-tilt-2.0.10 Generic interface to multiple Ruby template engines
rubygem-timeout-0.3.0 Auto-terminate potentially long-running operations in Ruby
rubygem-turbolinks-5.2.1 Turbolinks makes following links in your web application faster
rubygem-turbolinks-source-5.2.0 Turbolinks JavaScript assets
rubygem-tzinfo-2.0.4 Daylight-savings aware timezone support for Ruby
rubygem-uglifier-4.2.0 Ruby wrapper for UglifyJS JavaScript compressor
rubygem-web-console-rails61-4.2.0 Debugging tool for your Ruby on Rails applications
rubygem-webdrivers-5.0.0 Run Selenium tests more easily with install and updates for all supported webdrivers
rubygem-webmock-3.14.0 Allows stubbing HTTP requests and setting expectations on the requests
rubygem-webpacker-rails61-5.4.3_2 Use Webpack to manage app-like JavaScript modules in Rails
rubygem-webrick-1.7.0 HTTP server toolkit
rubygem-websocket-1.2.9 Universal Ruby library to handle WebSocket protocol
rubygem-websocket-driver-0.7.5 WebSocket protocol handler with pluggable I/O
rubygem-websocket-extensions-0.1.5 Generic extension manager for WebSocket connections
rubygem-xpath-3.2.0 DSL for generating XPath Expressions
rubygem-zeitwerk-2.6.0 Efficient and thread-safe code loader


Replies (4)

RE: Error with redmine 5.0.2 on FreeBSD 13.1 amd64 :: Redmine::WikiFormatting::CommonMark::HTML (NameError) - Added by Mischa The Evil over 1 year ago

I have opened #37394 for this issue because this was reported in the forums previously.

RE: Error with redmine 5.0.2 on FreeBSD 13.1 amd64 :: Redmine::WikiFormatting::CommonMark::HTML (NameError) - Added by Юрий Долгорукий over 1 year ago

Mischa The Evil wrote:

I have opened #37394 for this issue because this was reported in the forums previously.

Thanks for reply! If some testing, or investigations which can help in that issue are needed, I am ready to check and get any info from my test machine!

Also, if it helps, both topics about .....CommonMark::HTML.... issues are related to OS FreeBSD, they discovered through process of porting Remine 5.0.2 to FreeBSD.
Here is bugzilla thread about that process: 264638 (I can't insert link, forum gets 500 internal server error, so only bugID on bugs.freebsd.org)

RE: Error with redmine 5.0.2 on FreeBSD 13.1 amd64 :: Redmine::WikiFormatting::CommonMark::HTML (NameError) - Added by Azamat Hackimov over 1 year ago

Hello.

In Gemfile common_mark described as

group :common_mark do
  gem "html-pipeline", "~> 2.13.2" 
  gem "commonmarker", (Gem.ruby_version < Gem::Version.new('2.6.0') ? '0.21.0' : '0.23.4')
  gem "sanitize", "~> 6.0" 
  gem 'deckar01-task_list', '2.3.2'
end

i.e. you need =commonmarker-0.23.4 while you have rubygem-commonmarker-0.23.5. You need relax version for commonmarker like this:

group :common_mark do
  gem "html-pipeline", "~> 2.13.2" 
  gem "commonmarker", (Gem.ruby_version < Gem::Version.new('2.6.0') ? '0.21.0' : '~> 0.23.5') # Here
  gem "sanitize", "~> 6.0" 
  gem 'deckar01-task_list', '~> 2.3.2' # Here too
end

RE: Error with redmine 5.0.2 on FreeBSD 13.1 amd64 :: Redmine::WikiFormatting::CommonMark::HTML (NameError) - Added by Юрий Долгорукий over 1 year ago

Azamat Hackimov thanks!

Yes, patch for that ports are strips some parts of Gemfile
-# Optional CommonMark support, not for JRuby
-group :common_mark do
- gem "html-pipeline", "~> 2.13.2"
- gem "commonmarker", (Gem.ruby_version < Gem::Version.new('2.6.0') ? '0.21.0' : '0.23.4')
- gem "sanitize", "~> 6.0"
- gem 'deckar01-task_list', '2.3.2'
-end

And after add provided by You part to /usr/local/www/redmine/Gemfile error are disappear. Thanks!

Azamat Hackimov wrote:

Hello.

In Gemfile common_mark described as
[...]

i.e. you need =commonmarker-0.23.4 while you have rubygem-commonmarker-0.23.5. You need relax version for commonmarker like this:

[...]

    (1-4/4)