# Fail to rebuild and got 502 Bad Gateway

**URL:** <https://meta.discourse.org/t/fail-to-rebuild-and-got-502-bad-gateway/68390>\
**Category:** Self-hosting\
**Created:** [August 19, 2017, 5:42pm UTC](https://meta.discourse.org/t/fail-to-rebuild-and-got-502-bad-gateway/68390 "2017-08-19T17:42:10Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![xrav3nz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xrav3nz/32/76894_2.png) [@xrav3nz](https://meta.discourse.org/u/xrav3nz)\
**Post date:** [August 20, 2017, 1:47pm UTC](https://meta.discourse.org/t/fail-to-rebuild-and-got-502-bad-gateway/68390/5 "2017-08-20T13:47:19Z")

</div>

Line 2584 in your log file:

> Your bundle is locked to message\_bus (2.0.5), but that version could not be  
> found in any of the sources listed in your Gemfile. If you haven’t changed  
> sources, that means the author of message\_bus (2.0.5) has removed it. You’ll  
> need to update your bundle to a different version of message\_bus (2.0.5) that  
> hasn’t been removed in order to install.

So you’re correct that this is caused by the RubyGem mirror you’re using.

* * *

Running the following should remove the bundler mirror config.

```plaintext
bundle config --delete mirror.https://rubygems.org

```

[Here is](http://bundler.io/v1.15/bundle_config.html#MIRRORS-OF-GEM-SOURCES) the official doc on using mirrors with bundler.

---

_[View the full topic](https://meta.discourse.org/t/fail-to-rebuild-and-got-502-bad-gateway/68390)._
