Looking at bundler
, first I will try:
gem install bundler -v 2.3.27
Fetching: bundler-2.3.27.gem (100%)
Successfully installed bundler-2.3.27
Parsing documentation for bundler-2.3.27
Installing ri documentation for bundler-2.3.27
Done installing documentation for bundler after 0 seconds
1 gem installed
... but this resulted in the same error.
Try to update gem system:
linux:/var/discourse# gem update --system
Updating rubygems-update
ERROR: Error installing rubygems-update:
There are no versions of rubygems-update (= 3.5.3) compatible with your Ruby & RubyGems
rubygems-update requires Ruby version >= 3.0.0. The current ruby version is 2.5.0.
linux:/var/discourse# rbenv versions
* system
3.0.4
but this shows:
linux:/var/discourse# ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
So, I set the current version of Ruby using rbenv
:
# rbenv global 3.0.4
and ran this to update bundler:
# gem update --system
linux:/var/discourse# bundler -v
Bundler version 2.5.3
linux:/var/discourse# ruby -v
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux]
linux:/var/discourse# gem -v
3.5.3
so, now try upgrading rails:
gem update rails
...
Done installing documentation for actioncable, actionmailbox, actionmailer, actionpack, actiontext, actionview, activejob, activemodel, activerecord, activestorage, activesupport, concurrent-ruby, connection_pool, loofah, minitest, nokogiri, racc, rack, rack-session, rackup, rails, rails-dom-testing, rails-html-sanitizer, railties, thor, timeout, webrick after 10 seconds
Gems updated: actioncable actionmailbox actionmailer actionpack actiontext actionview activejob activemodel activerecord activestorage activesupport concurrent-ruby connection_pool loofah minitest nokogiri racc rack rack-session rackup rails rails-dom-testing rails-html-sanitizer railties thor timeout webrick
Try to build discourse again:
# ./launcher bootstrap socket3
same error:
An error occurred while installing rbtrace (0.5.1), and Bundler cannot continue.
Looking at the discourse build output, the error does appear do be inside the discourse container, which will not build:
I, [2023-12-24T03:30:38.587015 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle config --local deployment true'
I, [2023-12-24T03:30:38.699387 #1] INFO -- :
I, [2023-12-24T03:30:38.699452 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle config --local without "development test"'
I, [2023-12-24T03:30:38.811768 #1] INFO -- : You are replacing the current local value of without, which is currently "test:development"
I, [2023-12-24T03:30:38.811847 #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:
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.1/ext
/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
--prefix=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.1/ext/dst/
--libdir=/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rbtrace-0.5.1/ext/dst/lib
*** 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.
So, the error is in the discourse build inside the container for sure.
However, I'm hesitant to now upgrade docker
as it might break the current running forums and I'm not convinced docker
is the issue.
Discourse Install Error
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'
An error occurred while installing rbtrace (0.5.1), and Bundler cannot continue.
In Gemfile:
rbtrace
I, [2023-12-24T03:47:27.603733 #1] INFO -- : Fetching gem metadata from https://rubygems.org/.........