# החלף את rubygems.org במראה של Taobao כדי לפתור את שגיאת הרשת בסין

**URL:** https://meta.discourse.org/t/replace-rubygems-org-with-taobao-mirror-to-resolve-network-error-in-china/21988
**Category:** Sysadmins
**Tags:** how-to
**Created:** [10 בנובמבר,‏ 2014,‏ 3:08am UTC](https://meta.discourse.org/t/replace-rubygems-org-with-taobao-mirror-to-resolve-network-error-in-china/21988 "2014-11-10T03:08:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [10 בנובמבר,‏ 2014,‏ 3:08am UTC](https://meta.discourse.org/t/replace-rubygems-org-with-taobao-mirror-to-resolve-network-error-in-china/21988/1 "2014-11-10T03:08:07Z")

</div>

[rubygems.org](http://rubygems.org) hosts its resource in Amazon S3 which is disturbed by GFW. So `gem` and `bundle` complain from time to time.

This guide assumes you used docker installation. This guide also has a version in Chinese. [中文指南](https://meta.discoursecn.org/t/discourse/28)

### Add a template

Open your congiruation file, say, `app.yml`.

Add a reference to the china template:

```
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.china.yml"

```

### Bootstrap docker container

Rebuild your app

```
./launcher rebuild app

```

Or bootstrap:

```
./launcher bootstrap app

```

You are done! Everything should work then.

---

<div class="post-metadata">

### Author: ![xhh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xhh/32/115817_2.png) [@xhh](https://meta.discourse.org/u/xhh)
#### Post date: [1 ביוני,‏ 2015,‏ 7:42am UTC](https://meta.discourse.org/t/replace-rubygems-org-with-taobao-mirror-to-resolve-network-error-in-china/21988/7 "2015-06-01T07:42:31Z")

</div>

> [@fantasticfears](#):
>
> - “templates/web.china.yml”

I think the template file’s path should be “templates/web.china.template.yml”.

---

<div class="post-metadata">

### Author: ![ntrrobng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ntrrobng/32/121884_2.png) [@ntrrobng](https://meta.discourse.org/u/ntrrobng)
#### Post date: [31 במרץ,‏ 2016,‏ 1:01am UTC](https://meta.discourse.org/t/replace-rubygems-org-with-taobao-mirror-to-resolve-network-error-in-china/21988/8 "2016-03-31T01:01:08Z")

</div>

> [@xhh](#):
>
> I think the template file’s path should be “templates/web.china.template.yml”.

it looks like this suggestion has been implemented. could you update the original topic so that it reflects the appropriate fix?

---

<div class="post-metadata">

### Author: ![Hyan](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hyan](https://meta.discourse.org/u/Hyan)
#### Post date: [21 בינואר,‏ 2021,‏ 7:15am UTC](https://meta.discourse.org/t/replace-rubygems-org-with-taobao-mirror-to-resolve-network-error-in-china/21988/9 "2021-01-21T07:15:25Z")

</div>

Hi @fantasticfears Thanks share this tips. I’m going to self-host Discourse to avoid Discourse-host issue like blocked from access and performance.  
Do you know if Discouse source code itself has any service request that blocked by GFW. if it’s does a self-host cannot guarantee the sevice in mainland China.

ps. [https://meta.discoursecn.org/t/discourse/28](https://meta.discoursecn.org/t/discourse/28) is not available now.
