Project

General

Profile

Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server.

Added by Terence Lien almost 3 years ago

Hi there,

I install the Redmine 4.2 from github/svn/gz file, all has the same issue.
On Ubuntu 20.04.2-live-server that I whole new installed.
Please help, I have no idea what happens, I install 4.1.1 on Ubuntu 18.04 is fine.

steps:
  1. install new OS of Ubuntu 20.04.2-live-server from Ubuntu official website.
  2. login and install some apps as blow:
    sudo apt update
    sudo apt -y upgrade
    sudo apt-get install -y checkinstall gem libreoffice apache2 libapache2-mod-passenger ruby ruby-dev rails  libmysqlclient-dev libmagickwand-dev libapr1-dev libxslt1-dev libxml2-dev mysql-server imagemagick git subversion darcs mercurial cvs bzr 
    sudo apt-get install -y gcc build-essential zlib1g zlib1g-dev zlibc ruby-zip libssl-dev libyaml-dev libcurl4-openssl-dev apache2-dev libsqlite3-dev phpmyadmin
    sudo apt-get install -y xapian-omega ruby-xapian libxapian-dev poppler-utils antiword  unzip catdoc libwpd-tools libwps-tools gzip unrtf catdvi djview djview3 uuid uuid-dev xz-utils libemail-outlook-message-perl
    sudo gem update
    sudo gem install bundler
    

    and this step, gem update already show an error.
    Updating readline-ext
    Building native extensions. This could take a while...
    ERROR:  Error installing readline-ext:
            ERROR: Failed to build gem native extension.
    
        current directory: /var/lib/gems/2.7.0/gems/readline-ext-0.1.1/ext/readline
    /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210415-29393-a0m779.rb extconf.rb
    checking for tgetnum() in -lncurses... no
    checking for tgetnum() in -ltermcap... no
    checking for tgetnum() in -lcurses... no
    checking for readline/readline.h... no
    checking for editline/readline.h... no
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers.  Check the mkmf.log file for more details.  You may
    need configuration options.
    
    Provided configuration options:
            --with-opt-dir
            --without-opt-dir
            --with-opt-include
            --without-opt-include=${opt-dir}/include
            --with-opt-lib
            --without-opt-lib=${opt-dir}/lib
            --with-make-prog
            --without-make-prog
            --srcdir=.
            --curdir
            --ruby=/usr/bin/$(RUBY_BASE_NAME)2.7
            --with-curses-dir
            --without-curses-dir
            --with-curses-include
            --without-curses-include=${curses-dir}/include
            --with-curses-lib
            --without-curses-lib=${curses-dir}/lib
            --with-ncurses-dir
            --without-ncurses-dir
            --with-ncurses-include
            --without-ncurses-include=${ncurses-dir}/include
            --with-ncurses-lib
            --without-ncurses-lib=${ncurses-dir}/lib
            --with-termcap-dir
            --without-termcap-dir
            --with-termcap-include
            --without-termcap-include=${termcap-dir}/include
            --with-termcap-lib
            --without-termcap-lib=${termcap-dir}/lib
            --with-readline-dir
            --without-readline-dir
            --with-readline-include
            --without-readline-include=${readline-dir}/include
            --with-readline-lib
            --without-readline-lib=${readline-dir}/lib
            --enable-libedit
            --disable-libedit
            --with-ncurseslib
            --without-ncurseslib
            --with-termcaplib
            --without-termcaplib
            --with-curseslib
            --without-curseslib
            --with-editline-dir
            --without-editline-dir
            --with-editline-include
            --without-editline-include=${editline-dir}/include
            --with-editline-lib
            --without-editline-lib=${editline-dir}/lib
    extconf.rb:62:in `<main>': Neither readline nor libedit was found (RuntimeError)
    
    To see why this extension failed to compile, please check the mkmf.log which can be found here:
    
      /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/readline-ext-0.1.1/mkmf.log
    
    extconf failed, exit code 1
    
    Gem files will remain installed in /var/lib/gems/2.7.0/gems/readline-ext-0.1.1 for inspection.
    Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/readline-ext-0.1.1/gem_make.out
    
    
  3. create DB user account and redmine DB
  4. execute follow command then get error:
    sudo bundle exec rake generate_secret_token
    

    error:
    /usr/lib/ruby/2.7.0/cgi/util.rb:30: warning: already initialized constant CGI::Util::TABLE_FOR_ESCAPE_HTML__
    /var/lib/gems/2.7.0/gems/cgi-0.2.0/lib/cgi/util.rb:30: warning: previous definition of TABLE_FOR_ESCAPE_HTML__ was here
    /usr/lib/ruby/2.7.0/cgi/util.rb:178: warning: already initialized constant CGI::Util::RFC822_DAYS
    /var/lib/gems/2.7.0/gems/cgi-0.2.0/lib/cgi/util.rb:178: warning: previous definition of RFC822_DAYS was here
    /usr/lib/ruby/2.7.0/cgi/util.rb:181: warning: already initialized constant CGI::Util::RFC822_MONTHS
    /var/lib/gems/2.7.0/gems/cgi-0.2.0/lib/cgi/util.rb:181: warning: previous definition of RFC822_MONTHS was here
    /usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::ANY
    /usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::UTF8
    /usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::UTF16LE
    /usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::UTF16BE
    /usr/lib/x86_64-linux-gnu/ruby/2.7.0/stringio.so: warning: already initialized constant StringIO::VERSION
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:7: warning: already initialized constant Psych::ClassLoader::BIG_DECIMAL
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:7: warning: previous definition of BIG_DECIMAL was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:8: warning: already initialized constant Psych::ClassLoader::COMPLEX
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:8: warning: previous definition of COMPLEX was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:9: warning: already initialized constant Psych::ClassLoader::DATE
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:9: warning: previous definition of DATE was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:10: warning: already initialized constant Psych::ClassLoader::DATE_TIME
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:10: warning: previous definition of DATE_TIME was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:11: warning: already initialized constant Psych::ClassLoader::EXCEPTION
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:11: warning: previous definition of EXCEPTION was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:12: warning: already initialized constant Psych::ClassLoader::OBJECT
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:12: warning: previous definition of OBJECT was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:13: warning: already initialized constant Psych::ClassLoader::PSYCH_OMAP
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:13: warning: previous definition of PSYCH_OMAP was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:14: warning: already initialized constant Psych::ClassLoader::PSYCH_SET
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:14: warning: previous definition of PSYCH_SET was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:15: warning: already initialized constant Psych::ClassLoader::RANGE
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:15: warning: previous definition of RANGE was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:16: warning: already initialized constant Psych::ClassLoader::RATIONAL
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:16: warning: previous definition of RATIONAL was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:17: warning: already initialized constant Psych::ClassLoader::REGEXP
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:17: warning: previous definition of REGEXP was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:18: warning: already initialized constant Psych::ClassLoader::STRUCT
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:18: warning: previous definition of STRUCT was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:19: warning: already initialized constant Psych::ClassLoader::SYMBOL
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:19: warning: previous definition of SYMBOL was here
    /usr/lib/ruby/2.7.0/psych/class_loader.rb:65: warning: already initialized constant Psych::ClassLoader::CACHE
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/class_loader.rb:67: warning: previous definition of CACHE was here
    /usr/lib/x86_64-linux-gnu/ruby/2.7.0/strscan.so: warning: already initialized constant StringScanner::Version
    /usr/lib/x86_64-linux-gnu/ruby/2.7.0/strscan.so: warning: already initialized constant StringScanner::Id
    /usr/lib/ruby/2.7.0/psych/scalar_scanner.rb:9: warning: already initialized constant Psych::ScalarScanner::TIME
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/scalar_scanner.rb:9: warning: previous definition of TIME was here
    /usr/lib/ruby/2.7.0/psych/scalar_scanner.rb:12: warning: already initialized constant Psych::ScalarScanner::FLOAT
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/scalar_scanner.rb:12: warning: previous definition of FLOAT was here
    /usr/lib/ruby/2.7.0/psych/scalar_scanner.rb:17: warning: already initialized constant Psych::ScalarScanner::INTEGER
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/scalar_scanner.rb:17: warning: previous definition of INTEGER was here
    /usr/lib/ruby/2.7.0/psych/nodes/stream.rb:13: warning: already initialized constant Psych::Nodes::Stream::ANY
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/stream.rb:13: warning: previous definition of ANY was here
    /usr/lib/ruby/2.7.0/psych/nodes/stream.rb:16: warning: already initialized constant Psych::Nodes::Stream::UTF8
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/stream.rb:16: warning: previous definition of UTF8 was here
    /usr/lib/ruby/2.7.0/psych/nodes/stream.rb:19: warning: already initialized constant Psych::Nodes::Stream::UTF16LE
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/stream.rb:19: warning: previous definition of UTF16LE was here
    /usr/lib/ruby/2.7.0/psych/nodes/stream.rb:22: warning: already initialized constant Psych::Nodes::Stream::UTF16BE
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/stream.rb:22: warning: previous definition of UTF16BE was here
    /usr/lib/ruby/2.7.0/psych/nodes/sequence.rb:43: warning: already initialized constant Psych::Nodes::Sequence::ANY
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/sequence.rb:43: warning: previous definition of ANY was here
    /usr/lib/ruby/2.7.0/psych/nodes/sequence.rb:46: warning: already initialized constant Psych::Nodes::Sequence::BLOCK
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/sequence.rb:46: warning: previous definition of BLOCK was here
    /usr/lib/ruby/2.7.0/psych/nodes/sequence.rb:49: warning: already initialized constant Psych::Nodes::Sequence::FLOW
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/sequence.rb:49: warning: previous definition of FLOW was here
    /usr/lib/ruby/2.7.0/psych/nodes/scalar.rb:10: warning: already initialized constant Psych::Nodes::Scalar::ANY
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/scalar.rb:10: warning: previous definition of ANY was here
    /usr/lib/ruby/2.7.0/psych/nodes/scalar.rb:13: warning: already initialized constant Psych::Nodes::Scalar::PLAIN
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/scalar.rb:13: warning: previous definition of PLAIN was here
    /usr/lib/ruby/2.7.0/psych/nodes/scalar.rb:16: warning: already initialized constant Psych::Nodes::Scalar::SINGLE_QUOTED
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/scalar.rb:16: warning: previous definition of SINGLE_QUOTED was here
    /usr/lib/ruby/2.7.0/psych/nodes/scalar.rb:19: warning: already initialized constant Psych::Nodes::Scalar::DOUBLE_QUOTED
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/scalar.rb:19: warning: previous definition of DOUBLE_QUOTED was here
    /usr/lib/ruby/2.7.0/psych/nodes/scalar.rb:22: warning: already initialized constant Psych::Nodes::Scalar::LITERAL
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/scalar.rb:22: warning: previous definition of LITERAL was here
    /usr/lib/ruby/2.7.0/psych/nodes/scalar.rb:25: warning: already initialized constant Psych::Nodes::Scalar::FOLDED
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/scalar.rb:25: warning: previous definition of FOLDED was here
    /usr/lib/ruby/2.7.0/psych/nodes/mapping.rb:17: warning: already initialized constant Psych::Nodes::Mapping::ANY
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/mapping.rb:17: warning: previous definition of ANY was here
    /usr/lib/ruby/2.7.0/psych/nodes/mapping.rb:20: warning: already initialized constant Psych::Nodes::Mapping::BLOCK
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/mapping.rb:20: warning: previous definition of BLOCK was here
    /usr/lib/ruby/2.7.0/psych/nodes/mapping.rb:23: warning: already initialized constant Psych::Nodes::Mapping::FLOW
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/nodes/mapping.rb:23: warning: previous definition of FLOW was here
    /usr/lib/ruby/2.7.0/psych/visitors/visitor.rb:11: warning: already initialized constant Psych::Visitors::Visitor::DISPATCH
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/visitors/visitor.rb:23: warning: previous definition of DISPATCH was here
    /usr/lib/ruby/2.7.0/psych/handler.rb:27: warning: already initialized constant Psych::Handler::OPTIONS
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/handler.rb:27: warning: previous definition of OPTIONS was here
    /usr/lib/ruby/2.7.0/psych/handler.rb:30: warning: already initialized constant Psych::Handler::EVENTS
    /var/lib/gems/2.7.0/gems/psych-3.3.1/lib/psych/handler.rb:30: warning: previous definition of EVENTS was here
    rake aborted!
    TypeError: superclass mismatch for class Mark
    /var/lib/gems/2.7.0/gems/railties-5.2.5/lib/rails/application.rb:3:in `require'
    /var/lib/gems/2.7.0/gems/railties-5.2.5/lib/rails/application.rb:3:in `<top (required)>'
    /var/lib/gems/2.7.0/gems/railties-5.2.5/lib/rails.rb:14:in `require'
    /var/lib/gems/2.7.0/gems/railties-5.2.5/lib/rails.rb:14:in `<top (required)>'
    /opt/redmine/config/application.rb:5:in `require'
    /opt/redmine/config/application.rb:5:in `<top (required)>'
    /opt/redmine/Rakefile:5:in `require'
    /opt/redmine/Rakefile:5:in `<top (required)>'
    /var/lib/gems/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in `load'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:63:in `kernel_load'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/cli/exec.rb:28:in `run'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/cli.rb:494:in `exec'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/cli.rb:30:in `dispatch'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/cli.rb:24:in `start'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/exe/bundle:49:in `block in <top (required)>'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
    /var/lib/gems/2.7.0/gems/bundler-2.2.16/exe/bundle:37:in `<top (required)>'
    /usr/local/bin/bundle:23:in `load'
    /usr/local/bin/bundle:23:in `<main>'
    (See full trace by running task with --trace)
    

Replies (8)

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by Anonymous almost 3 years ago

I Had the exact same problem with ubuntu 20.04 server, try :

sudo bundle clean --force

Maybe it should be added to the Wiki

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by Terence Lien almost 3 years ago

匿名用戶 wrote:

I Had the exact same problem with ubuntu 20.04 server, try :
[...]

Maybe it should be added to the Wiki

Thank you reply,
but I try the command, still occur this error...

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by Janeks Kamerovskis almost 3 years ago

The same problem for me on Ubuntu 20

I used this receipe: https://otodiginet.com/software/how-to-install-redmine-on-ubuntu-20-04-lts/

Managet to get till the:

sudo apt install redmine redmine-mysql

That ended with the same as Terence wrote.

This did not help:

sudo bundle clean --force

What could be wrong?

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by LEXO IT Services Switzerland over 2 years ago

Same problem here. Execution:

bundle exec rake generate_secret_token --trace

Result

rake aborted!
TypeError: superclass mismatch for class Command
/var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:2:in `<class:Thor>'
/var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:1:in `<top (required)>'
/var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:1:in `require_relative'
/var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:1:in `<top (required)>'
/var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/group.rb:1:in `require_relative'
/var/lib/gems/2.7.0/gems/thor-1.1.0/lib/thor/group.rb:1:in `<top (required)>'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/generators.rb:6:in `<top (required)>'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/app_updater.rb:3:in `<top (required)>'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/tasks/framework.rake:41:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/task_manager.rb:232:in `in_namespace'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/dsl_definition.rb:141:in `namespace'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/tasks/framework.rake:40:in `block in <top (required)>'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/task_manager.rb:232:in `in_namespace'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/dsl_definition.rb:141:in `namespace'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/tasks/framework.rake:3:in `<top (required)>'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `load'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `block in load'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:285:in `load'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/tasks.rb:21:in `block in <top (required)>'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/tasks.rb:20:in `each'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/tasks.rb:20:in `<top (required)>'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.7.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/application.rb:516:in `run_tasks_blocks'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/engine.rb:459:in `load_tasks'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/railtie.rb:190:in `public_send'
/var/lib/gems/2.7.0/gems/railties-5.2.6/lib/rails/railtie.rb:190:in `method_missing'
/home/redmine/Rakefile:7:in `<top (required)>'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/var/lib/gems/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<top (required)>'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/lib/ruby/vendor_ruby/thor/command.rb:27:in `run'
/usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in `invoke_command'
/usr/lib/ruby/vendor_ruby/thor.rb:369:in `dispatch'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/lib/ruby/vendor_ruby/thor/base.rb:444:in `start'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/share/rubygems-integration/all/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by LEXO IT Services Switzerland over 2 years ago

EUREKA !!!! I FOUND A SOLUTION!

Install/Update Ruby DEV and update GEM

apt install ruby-dev
gem update

Update Redmine (in this example by accessing the SVN

svn switch https://svn.redmine.org/redmine/branches/4.2-stable

Change the version of THOR in the Gemfile

Edit the Redmine Gemfile

nano Gemfile

Add the following entry for the THOR Gem. Because by default the system has version 1.1.0 (or similar) installed which creates a conflict

gem "thor", "~> 0.20.3" 

Clean and update the installation with BUNDLE

Execute the following commands

bundle clean --force
bundle update thor
bundle install
bundle update

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by LEXO IT Services Switzerland over 2 years ago

Additional note: After the update redmine did not work. I had to do the following to make it work:

Change the ruby binary softlink since it was still pointing to ruby version 2.5

cd /usr/bin
rm ruby
ln -s ruby2.7 ruby

Make sure Ruby 2.7 is installed

apt install ruby2.7

Uninstall all ruby2.5 libaries and everything about it

apt purge libruby2.5 ruby2.5 ruby2.5-dev ruby2.5-doc
rm -r /var/lib/gems/2.5.0/
rm -r /usr/lib/ruby/gems/2.5.0/

Update GEM once more to make sure that everything compiles correctly. Also update the GEM system

Try this first:

gem update --system

If the above does not work try this:

gem update --system 3.1.3

Then update all GEMs once more and have everything recompiled properly

gem update

And then do the bundle thing again to be sure that the system is using the proper bundle version and everything

bundle clean --force
bundle update thor
bundle install
bundle update

Restart the webserver and try again

This did the job for me. I hope this helps other people since I needed like 2.5 hours now to fiddle that out.

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by Terence Lien over 2 years ago

When I new install by ubuntu-20.04.3-live-server-amd64.iso

do gem update --system 3.1.3
is fine, and then execute gem update
will shows error:

Updating installed gems
Updating readline-ext
Building native extensions. This could take a while...
ERROR:  Error installing readline-ext:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.7.0/gems/readline-ext-0.1.2/ext/readline
/usr/bin/ruby2.7 -I /usr/local/lib/site_ruby/2.7.0 -r ./siteconf20211019-46880-xg4cto.rb extconf.rb
checking for tgetnum() in -lncurses... no
checking for tgetnum() in -ltermcap... no
checking for tgetnum() in -lcurses... no
checking for readline/readline.h... no
checking for editline/readline.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Is it ok?
or have any solve way?

Thanks.

RE: Get: "TypeError: superclass mismatch for class Mark" when Install redmine 4.2 on Ubuntu 20.04.2-live-server. - Added by T Goeg over 2 years ago

I wish Redmine updates would work out more smoothly..
I copied over the 3.4.x installation's DB and installation dir to a fresh Ubuntu 20.04 LTS testserver.
Update to 4.2.3 went smoothly.

Now, the inplace update on the production machine took me 1.5h.

Thanks a lot for all the magic posted here, I don't quite get why I have to do all this, but it works. Exact same errors as stated here.

And I got the same error as Terence Lien above and fixed it by installing

apt-get install libreadline-dev
bundle update
still produced errors. One of those can be fixed by issuing the suggested
gem install io-wait -v 0.1.0
The other one
ERROR:  Error installing io-wait:
    There are no versions of io-wait (= 0.2.0) compatible with your Ruby & RubyGems
    io-wait requires Ruby version >= 3.0.0. The current ruby version is 2.7.0.0.
Gems updated: io-wait
still remains. I don't know whether this is a problem or not...

This should be converted to a bug report, but I am unsure where the actual problem lies now... Is it a Debian/Ubuntu packaging problem? Should we uninstall some OS-provided ruby packages? Why is thor the wrong version? This needs to fixed somewhere..

Thanks again!

    (1-8/8)