Upgrade from 3.1.1 to 3.2.0 failing

Tried via web and CLI. The log says:

To see why this extension failed to compile, please check the mkmf.log which can
be found here:


But I don’t even have a “vendor” folder in my discourse folder?!

The upgrade attempt leaves me in a non-functional state which ./discourse-doctor is able to fix.

Any ideas how to get past this?

FULL LOG (where issues start to appear)

I, [2024-01-31T20:09:59.830751 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle config --local deployment true'
I, [2024-01-31T20:10:00.523559 #1]  INFO -- :
I, [2024-01-31T20:10:00.524352 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle config --local without "development test"'
I, [2024-01-31T20:10:00.865136 #1]  INFO -- : You are replacing the current local value of without, which is currently "test:development"

I, [2024-01-31T20:10:00.865950 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4'
**Gem::Ext::BuildError: ERROR: Failed to build gem native extension.**

current directory:
/usr/local/bin/ruby extconf.rb
  -- tar zxvfo msgpack-1.1.0.tar.gz
  -- env CFLAGS=nil LDFLAGS=nil CC=nil
-- ./configure --disable-dependency-tracking --disable-shared --with-pic
*** 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:
extconf.rb:6:in `sys': ./configure --disable-dependency-tracking
--disable-shared --with-pic
failed, please report to https://github.com/tmm1/rbtrace/issues (RuntimeError)
        from extconf.rb:42:in `block (2 levels) in <main>'
        from extconf.rb:34:in `chdir'
        from extconf.rb:34:in `block in <main>'
        from extconf.rb:30:in `chdir'
        from extconf.rb:30:in `<main>'

**To see why this extension failed to compile, please check the mkmf.log which can**
**be found here:**


extconf failed, exit code 1

Gem files will remain installed in
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.1 for inspection.
Results logged to

  /usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:125:in `run'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:227:in `block in
  /usr/local/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:224:in `each'
`block in worker_pool'
`block in process_queue'
`block (2 levels) in create_threads'

An error occurred while installing rbtrace (0.5.1), and Bundler cannot continue.

In Gemfile:
I, [2024-01-31T20:10:51.337197 #1]  INFO -- : Fetching gem metadata from https://rubygems.org/.........
Fetching concurrent-ruby 1.2.3
Fetching minitest 5.21.2
Fetching bigdecimal 3.1.6
Fetching cbor
Installing bigdecimal 3.1.6 with native extensions
Installing cbor with native extensions
Installing minitest 5.21.2
Installing concurrent-ruby 1.2.3
Fetching excon 0.109.0
Installing excon 0.109.0
Fetching fastimage 2.3.0
Installing fastimage 2.3.0
Fetching google-protobuf 3.25.2 (x86_64-linux)
Fetching highline 3.0.1
Installing highline 3.0.1
Installing google-protobuf 3.25.2 (x86_64-linux)
Fetching image_size 3.4.0
Installing image_size 3.4.0
Fetching regexp_parser 2.9.0
Fetching logster 2.16.0
Installing regexp_parser 2.9.0
Installing logster 2.16.0
Fetching stackprof 0.2.26
Installing stackprof 0.2.26 with native extensions
Fetching nokogiri 1.16.0 (x86_64-linux)
Installing nokogiri 1.16.0 (x86_64-linux)
Fetching rack-protection 3.2.0
Installing rack-protection 3.2.0
Fetching bootsnap 1.17.1
Installing bootsnap 1.17.1 with native extensions
Fetching net-http 0.4.1
Installing net-http 0.4.1
Fetching sass-embedded 1.70.0 (x86_64-linux-gnu)
Installing sass-embedded 1.70.0 (x86_64-linux-gnu)
Fetching puma 6.4.2
Installing puma 6.4.2 with native extensions
Fetching rbtrace 0.5.1
Installing rbtrace 0.5.1 with native extensions
Fetching net-imap
Installing net-imap
Fetching net-smtp
Installing net-smtp
Fetching faraday-net_http 3.1.0
Installing faraday-net_http 3.1.0
Fetching activesupport 7.0.8
Installing activesupport 7.0.8
Fetching tzinfo-data 1.2023.4
Installing tzinfo-data 1.2023.4
Fetching sassc-embedded 1.70.0
Installing sassc-embedded 1.70.0
Fetching faraday 2.9.0
Installing faraday 2.9.0
Fetching activemodel 7.0.8
Installing activemodel 7.0.8
Fetching actionview 7.0.8
Installing actionview 7.0.8
Fetching activejob 7.0.8
Installing activejob 7.0.8
Fetching activerecord 7.0.8
Installing activerecord 7.0.8
Fetching actionpack 7.0.8
Installing actionpack 7.0.8
Fetching actionmailer 7.0.8
Installing actionmailer 7.0.8
Fetching railties 7.0.8
Installing railties 7.0.8

I, [2024-01-31T20:10:51.488182 #1]  INFO -- : Terminating async processes
I, [2024-01-31T20:10:51.493415 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 40
2024-01-31 20:10:51.502 UTC [40] LOG:  received fast shutdown request
I, [2024-01-31T20:10:51.502920 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 109
109:signal-handler (1706731851) Received SIGTERM scheduling shutdown...
109:M 31 Jan 2024 20:10:51.704 # User requested shutdown...
109:M 31 Jan 2024 20:10:51.705 * Saving the final RDB snapshot before exiting.
2024-01-31 20:10:51.746 UTC [40] LOG:  aborting any active transactions
2024-01-31 20:10:51.750 UTC [40] LOG:  background worker "logical replication launcher" (PID 49) exited with exit code 1
2024-01-31 20:10:51.755 UTC [44] LOG:  shutting down
109:M 31 Jan 2024 20:10:52.025 * DB saved on disk
109:M 31 Jan 2024 20:10:52.034 # Redis is now ready to exit, bye bye...
2024-01-31 20:10:52.197 UTC [40] LOG:  database system is shut down

Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4' failed with return #<Process::Status: pid 530 exit 5>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle config --local deployment true'", "su discourse -c 'bundle config --local without \"development test\"'", "su discourse -c 'bundle install --retry 3 --jobs 4'"]}
bootstrap failed with exit code 5
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Do you have any non-official plugins?

What does cat /etc/issue show you about your current OS? Is it still supported?


Only a single plugin is enabled: discourse-adplugin v1.2.5

OS: Ubuntu 16.04.7 LTS <= I’m guessing that’s the problem. I’ll update that and see what happens.


Ah, there’s the killer. There’s quite a few topics on this one by now.

Indeed, rbtrace doesn’t seem to compile on older systems.

1 Like