# Rebuild failed with error

**URL:** https://meta.discourse.org/t/rebuild-failed-with-error/227284
**Category:** Self-hosting
**Created:** [May 17, 2022, 7:49am UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284 "2022-05-17T07:49:20Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![fb9572a](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fb9572a/32/173941_2.png) [@fb9572a](https://meta.discourse.org/u/fb9572a)
#### Post date: [May 17, 2022, 7:49am UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/1 "2022-05-17T07:49:20Z")

</div>

My forum works well for a while , and trying to upgrade from the current version `2.8.0.beta7`, it showns error of

```ruby

I, [2022-05-17T07:29:17.860652 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
bundler: failed to load command: rake (/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake)
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated uri 0.10.0, but your Gemfile requires uri 0.11.0. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError)
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:25:in `block in setup'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/spec_set.rb:136:in `each'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/spec_set.rb:136:in `each'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:24:in `map'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:24:in `setup'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler.rb:151:in `setup'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `block in <top (required)>'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:136:in `with_level'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:88:in `silence'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `<top (required)>'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:56:in `require_relative'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:56:in `kernel_load'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
        from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
        from /usr/local/bin/bundle:23:in `load'
        from /usr/local/bin/bundle:23:in `<main>'
I, [2022-05-17T07:29:18.139287 #1] INFO -- :

```

I don’t know why the dependency gem is inconsistent.

This is what I did:

1. login to server and do `github pull`
2. do `./launcher rebuild app`  
2.1 there is no other plugin except the `docker-manager`
3. I tried a few times, and also ./discourse-docter, but shown the same error.
4. I have a container `data` that stored the data.

Please help as the site is offline :frowning:

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 17, 2022, 10:44am UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/2 "2022-05-17T10:44:35Z")

</div>

Try rebuilding the data container and then the web container.

---

<div class="post-metadata">

### Author: ![fb9572a](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fb9572a/32/173941_2.png) [@fb9572a](https://meta.discourse.org/u/fb9572a)
#### Post date: [May 17, 2022, 11:15am UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/3 "2022-05-17T11:15:49Z")

</div>

thanks for reply.

I tried rebuild the data container, but still same error.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 17, 2022, 12:00pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/4 "2022-05-17T12:00:40Z")

</div>

You might see if

```
  ./launcher start app

```

Will restart the forum

---

<div class="post-metadata">

### Author: ![fb9572a](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fb9572a/32/173941_2.png) [@fb9572a](https://meta.discourse.org/u/fb9572a)
#### Post date: [May 17, 2022, 12:17pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/5 "2022-05-17T12:17:37Z")

</div>

Sorry that won’t work as there is no app container.

However I changed the version from `tests-passed` to `stable`, then I’m able to install all gems. The forum is back online again. Not sure what’s the difference, and why is this.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 17, 2022, 12:30pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/6 "2022-05-17T12:30:45Z")

</div>

> [@fb9572a](#):
>
> Sorry that won’t work as there is no app container

Then you should have used the name of your container.

```
    ./launcher start web_only

```

But your solution worked!

---

<div class="post-metadata">

### Author: ![fb9572a](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fb9572a/32/173941_2.png) [@fb9572a](https://meta.discourse.org/u/fb9572a)
#### Post date: [May 17, 2022, 1:00pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/7 "2022-05-17T13:00:06Z")

</div>

sorry what i mean is I set the yml file to `data.yml`, so it could be

`./launcher start data`

However during the building that had error, docker container was not able to be built. So I don’t think it’s possible to be started by above cli.

Anyway if anyone see something similar, or find the solution, please share it here.

thanks.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 17, 2022, 1:51pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/8 "2022-05-17T13:51:38Z")

</div>

Please share your app.yml plugin list. You have a plugin that conflicts with latest Discourse.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 17, 2022, 3:44pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/9 "2022-05-17T15:44:03Z")

</div>

> [@fb9572a](#):
>
> I don’t think it’s possible to be started by above cli.

But you didn’t try? You can usually re-start the old/existing container if a rebuild fails.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 17, 2022, 3:52pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/10 "2022-05-17T15:52:08Z")

</div>

This is hard to make sense of.

> [@fb9572a](#):
>
> do `./launcher rebuild app`

> [@fb9572a](#):
>
> Sorry that won’t work as there is no app container.

> [@Falco](#):
>
> Please share your app.yml plugin list. You have a plugin that conflicts with latest Discourse.

It seems clear that it’s a plugin issue, but he also said.

> [@fb9572a](#):
>
> 2.1 there is no other plugin except the `docker-manager`

But since

> [@fb9572a](#):
>
> However I changed the version from `tests-passed` to `stable` , then I’m able to install all gems. The forum is back online again. Not sure what’s the difference, and why is this.

So, it seems that he’s back online.

---

<div class="post-metadata">

### Author: ![fb9572a](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fb9572a/32/173941_2.png) [@fb9572a](https://meta.discourse.org/u/fb9572a)
#### Post date: [May 17, 2022, 10:43pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/11 "2022-05-17T22:43:08Z")

</div>

You are right, `./launcher start app` will start the old container.

---

<div class="post-metadata">

### Author: ![fb9572a](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fb9572a/32/173941_2.png) [@fb9572a](https://meta.discourse.org/u/fb9572a)
#### Post date: [May 17, 2022, 10:46pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/12 "2022-05-17T22:46:15Z")

</div>

```yaml
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git

```

This is the only plugin I have.

---

<div class="post-metadata">

### Author: ![fb9572a](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fb9572a/32/173941_2.png) [@fb9572a](https://meta.discourse.org/u/fb9572a)
#### Post date: [May 17, 2022, 10:55pm UTC](https://meta.discourse.org/t/rebuild-failed-with-error/227284/13 "2022-05-17T22:55:02Z")

</div>

> [@fb9572a](#):
>
> ```plaintext
> git clone https://github.com/discourse/docker_manager.git
> 
> ```

I tried again, with only this plugin, I can confirm if I change the version to `tests-passed`, it will fail with the error above. But if i change to `stable`, it works well.

Actually when I put more plugins with version `stable`, I’m still able to build the app. So don’t think it’s really the plugins issue in my case.
