# Discourse Build Error: "An error occurred while installing rbtrace (0.5.1), and Bundler cannot continue."

**URL:** <https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781>\
**Category:** Discourse System Administration\
**Created:** [December 22, 2023, 4:01am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781 "2023-12-22T04:01:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 22, 2023, 4:01am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/1 "2023-12-22T04:01:45Z")

</div>

For the past few weeks or so, I cannot rebuild our Discourse forum software.

Each time, we get this Bundler error:

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

```

### failing:

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4' failed with return #<Process::Status: pid 541 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.
dfd1d73cc65b60ab8b8963ad9bdb005500322808bf8766cf90c07c91d3dea615

```

so I tried, [from this reference](https://github.com/rubinius/rubinius/issues/3327)

```plaintext
gem install rbtrace -v '0.5.1' --source 'http://rubygems.org/' -- --with-cflags=-Wno-implicit-function-declaration

```

with success:

```plaintext
Building native extensions with: '--with-cflags=-Wno-implicit-function-declaration'
This could take a while...
Successfully installed rbtrace-0.5.1
Parsing documentation for rbtrace-0.5.1
Done installing documentation for rbtrace after 0 seconds
1 gem installed

```

But it keeps failing.....

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

```

If this error cannot be fixed, I will need to rebuild Discourse from scratch in an entire new directory structure and change all our admin scripts, etc.

☹

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 22, 2023, 4:10am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/2 "2023-12-22T04:10:49Z")

</div>

@vbe

Was going to ask you to post this question in the discourse meta forum, but after some searching, I am not hopeful anyone there will offer any tangible / actionable constructive suggestions.

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [December 22, 2023, 10:03am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/3 "2023-12-22T10:03:45Z")

</div>

I posted this:

> **[Discourse Build Error: “An error occurred while installing rbtrace (0.5.1),...](https://meta.discourse.org/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/289530)**
>
> For the past few weeks or so, we cannot rebuild our Discourse forum software. Each time, we get this Bundler error: occurred while installing rbtrace (0.5.1), and Bundler cannot continue. FAILED -------------------- Pups::ExecError: cd...

Let's see...

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 22, 2023, 12:26pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/4 "2023-12-22T12:26:36Z")

</div>

> [@vbe](#):
>
> Let's see...

Thanks Victor!

Maybe we will get lucky this time 🙂

---

<div class="post-metadata">

**Author:** ![hicksd8](https://community.unix.com/letter_avatar/hicksd8/32/5_5575768a8748004e209b776fc1b2916d.png) [@hicksd8](https://community.unix.com/u/hicksd8)\
**Post date:** [December 22, 2023, 4:57pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/5 "2023-12-22T16:57:30Z")

</div>

Perhaps you're not the only one. This topic relates to rbtrace 0.5.0 which I guess is not a million miles away?

> **[Update Fails with Unexpected Error During Rebuild](https://meta.discourse.org/t/update-fails-with-unexpected-error-during-rebuild/288718)**
>
> Hi Everyone, I’m stuck with a Discourse update issue. The rebuild command fails, and I can’t complete the update. It’s related to the bundle install step… FAILED Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install...

Certainly the error msgs are pretty much the same.

(And, obviously, I'm not a Discourse user/techie so I'm not sure of my facts.)

This closed just 3 days ago! Not the only one perhaps?

Ok, it doesn't solve it.

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [December 22, 2023, 6:47pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/6 "2023-12-22T18:47:48Z")

</div>

And of course there is this one...

> **[Rebuild failed - FAILED TO BOOTSTRAP](https://meta.discourse.org/t/rebuild-failed-failed-to-bootstrap/289514/7)**
>
> Any thoughts @pfaffman? Or do any of the Discourse team have any thoughts on the best way to approach this?

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 23, 2023, 3:12am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/7 "2023-12-23T03:12:37Z")

</div>

> [@vbe](#):
>
> And of course there is this one...

Yes, and there is no solution or even a root cause discussion in that meta discourse forum post.

> [@hicksd8](#):
>
> Perhaps you're not the only one. This topic relates to rbtrace 0.5.0 which I guess is not a million miles away?

Yes, it's an issue and it's (not really) surprising that discourse has not addressed it to date.

```plaintext
ubuntu_linux:/var/disco# git pull
Already up to date.

```

#### Our Discourse Building Admin Script

```plaintext
ubuntu_linux:/var/disco# buildnewsocket
...
...
...
...
...

```

#### Final Build Error

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4' failed with return #<Process::Status: pid 543 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.
9725dda21c23ab35742fd83f9fdbcef12440e5a9946a844a04c5ca4435322e7f
Bootstrap failed

```

### Build Failure Line Error

```plaintext
/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-23T03:09:39.054005 #1] INFO -- : Fetching gem metadata from https://rubygems.org/.........

```

Really do not want to spend time during the holidays rebuilding discourse from scratch, restoring all images, thumbnails and the entire DB, due to this discourse bundle error.

!!!

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 23, 2023, 3:27am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/8 "2023-12-23T03:27:47Z")

</div>

This is interesting.....

This Ruby Gem `rbtrace` has this version history:

```plaintext
0.5.1 - December 19, 2023 (509 KB)
0.5.0 - December 01, 2023 (509 KB)
0.4.14 - August 03, 2020 (508 KB)
0.4.13 - May 19, 2020 (508 KB)
0.4.12 - March 17, 2020 (508 KB)

```

So, the discourse bundle error corresponds to the new December `5.0` releases.

Reference:

[https://rubygems.org/gems/rbtrace](https://rubygems.org/gems/rbtrace)

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 23, 2023, 5:03am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/9 "2023-12-23T05:03:24Z")

</div>

It seems the `rbtrace` ruby gem reference is in the discourse docker image; because I searched the repo here:

[https://github.com/search?q=repo%3Adiscourse%2Fdiscourse\_docker++rbtrace&type=code](https://github.com/search?q=repo%3Adiscourse%2Fdiscourse_docker++rbtrace&type=code)

and removing that reference did not effect the build process.

I also tried removing the `rbtrace` gem from the build `Gemfile` and that did not work either, so my current best guess is that the root cause of this error exists in the `discourse-docker` image.

Worked on this for about 2 full hours; and cannot remove the gem or update it during the build process using the build `yml` file.

:annoyed:

☹

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [December 23, 2023, 10:06am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/10 "2023-12-23T10:06:45Z")

</div>

Reminding me posts blaming docker version ( too old...)

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [December 23, 2023, 10:11am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/11 "2023-12-23T10:11:12Z")

</div>

Hey even Falco posted:  
[Falco](https://meta.discourse.org/u/Falco)[team](https://meta.discourse.org/g/team)

[11h](https://meta.discourse.org/t/rebuild-failed-failed-to-bootstrap/289514/11?u=victor_berridge)

Can you please share your docker version, OS version and kernel version?

We have been getting a fair share of failures like this, but I’ve been unable to reproduce it in my droplets.

(To Aston T ...)  
in this thread

> **[Rebuild failed - FAILED TO BOOTSTRAP](https://meta.discourse.org/t/rebuild-failed-failed-to-bootstrap/289514)**
>
> Been a while since this forum was updated, getting this message after a git pull and rebuild: FAILED -------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --retry 3 --jobs 4' failed with return #...

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 23, 2023, 11:53am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/12 "2023-12-23T11:53:56Z")

</div>

> [@vbe](#):
>
> Can you please share your docker version, OS version and kernel version?

I don't think any those questions are actually relevant to `Ruby` and the `bundle` process (OS version and kernel version) but here is the more relevant info, in my view:

```plaintext
# docker -v
Docker version 18.09.7, build 2d0083d

# /usr/local/bin/rbtrace -v
rbtrace: like strace, but for ruby code
  version 0.5.1
  (c) 2013 Aman Gupta (tmm1)
  http://github.com/tmm1/rbtrace

# ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

# rails -v
Rails 4.2.10

# gem -v
2.7.6

# bundle -v
Bundler version 2.3.15

```

The error is a `Ruby on Rails` `bundle` error, so the relevant information is more closely related to `Rails` versioning, not the underlying OS or docker version.

In other words, the app should be independent (decoupled) from the Linux OS version and kernel version.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [December 23, 2023, 12:02pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/13 "2023-12-23T12:02:27Z")

</div>

Since I have had no other replies since the one linked to Rebuild failed- FAILED TO BOOTSTRAP... I will let them continue their way, and see if anything new arise before suggesting them to look at ruby... They seem more interested by this thread than mine, maybe because there are others that have complained but not in the forum...

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 23, 2023, 12:10pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/14 "2023-12-23T12:10:44Z")

</div>

My prior experience is that both `pfaffman` and `Falco` of discourse meta are not deep enough technically to troubleshoot this kind of error. They are more expert at cookie cutter installs and standard template build support; and not more complex, deeper `bundle` and `Ruby` build errors.

Anyway, standing by.... 🙂

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [December 23, 2023, 12:15pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/15 "2023-12-23T12:15:01Z")

</div>

pfaffman is on vacation till 01.01.24, unless you are ready to pay $$$$$:

> If it’s an emergency and you have a budget you can post in #marketplace::category or contact me directly.

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 23, 2023, 12:19pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/16 "2023-12-23T12:19:11Z")

</div>

Before I update `docker` or `bundle` etc; the smart thing to do would be to just do a test, fresh install in a new directory and see if discourse will compile and run from a virgin install on our current platform.

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [December 23, 2023, 12:23pm UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/17 "2023-12-23T12:23:25Z")

</div>

It may work, based on what I have read...

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 24, 2023, 2:56am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/18 "2023-12-24T02:56:55Z")

</div>

Just tested building discourse from scratch on the same server and got the same error:

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

```

So, I'll disable all the custom plugins to see if any plugin might be causing the problem and try again.

Same error with all custom plugins disabled.

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

```

Now, I disable all extra `Ruby gems` in the build file:

See error with extra `gems` removed:

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

```

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 24, 2023, 3:35am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/19 "2023-12-24T03:35:08Z")

</div>

> [@Neo](#):
>
> `An error occurred while installing rbtrace (0.5.1), and Bundler cannot continue.`

Looking at `bundler`, first I will try:

```plaintext
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:

```plaintext
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.

```

```plaintext
linux:/var/discourse# rbenv versions
* system
  3.0.4

```

but this shows:

```plaintext
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`:

```plaintext
# rbenv global 3.0.4

```

and ran this to update bundler:

```plaintext
# gem update --system

```

```plaintext
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:

```plaintext
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:

```plaintext
# ./launcher bootstrap socket3

```

same error:

```plaintext
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:

```plaintext
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

```plaintext
/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/.........

```

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [December 24, 2023, 3:52am UTC](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781/20 "2023-12-24T03:52:51Z")

</div>

Checking the current running discourse docker container:

```plaintext
linux:/var/discourse# docker exec -it socket2 bash
root@linux-socket2:/# bundler -v
Bundler version 2.4.21

root@linux-socket2:/# ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]

root@linux-socket2:/# rails -v
Rails 7.0.7

root@linux-socket2:/# rbtrace -v
*** run `sudo sysctl kernel.msgmnb=1048576` to prevent losing events (currently: 16384 bytes)
rbtrace: like strace, but for ruby code
  version 0.4.14

```

However, I don't see any clear path to downgrade `rbtrace` because it looks like it exists in the discourse docker image which is downloaded when installed.

In the current working container:

### Gemfile

```plaintext
gem "rbtrace", require: false, platform: :mri

```

I could try (again) to remove that line someone when the container is built, something like:

```plaintext
 after_code:
    - exec:
        cd: $home
        cmd:
          - sed -i '/rbtrace/d' Gemfile
          - sed -i '/rbtrace/d' Gemfile.lock
          - echo "gem 'rbtrace', '~> 0.4.14'" >> Gemfile
          - su discourse -c 'bundle config unset deployment'
          - su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'

```

But interestingly enough, now I get this error:

```plaintext
An error occurred while installing rbtrace (0.4.14), and Bundler cannot
continue.

```

So, I was able to `hack` the discourse build `yml` file and change the version of `rbtrace` to the prior working version, but that also fails.

So, even a `ninja server warrior` like me, cannot get past this error (yet).

!!

[Next page](https://community.unix.com/t/discourse-build-error-an-error-occurred-while-installing-rbtrace-0-5-1-and-bundler-cannot-continue/392781.md?page=2)
