Connection Problem from China, can't install the gems


(Erick Guan) #1

Today I just went to help a guy to set up a Discourse instance. Here is a problem I have to deal with.

It’s known GFW blocks many traffic which goes to outside world, like facebook and twitter. But it blocks rubygems too. I know it’s weird, which Chinese engineers agree, but it’s the truth.

We built mirrors to deal with it. Here is one supported by Taobao which sync in every 15 minutes. But if I want a docker installation, I have to connect to a VPN which is awkward for end users.

Can we do something for that problem?


Gem update bunlder error Errno::ETIMEDOUT: Connection timed out - connect
(Hunter Owens) #2

@fantasticfears

Not ideal long term, but I would recommend setting up a VPS in a data center that is outside of the GFW (for example, DigitalOcean has a Singapore datacenter, Amazon has Tokyo & Singapore) and then serving the website from there. That is what I did while I was working on sites while in China. Ping to Singapore, Korea and Japan is generally quite fast. I’ve also just solely developed on VPS’s outside the GFW.

When developing locally, you can simply VPN your connection.

It should be easy to add a flag to add the Taobao rubygems mirror to the Gemfile?


(Robin Ward) #3

@sam how hard would it be to allow the rubygems source to be specified by an environment variable? I know we’ve talked about creating local mirrors ourselves, so we could kill two birds with one stone.


(Erick Guan) #4

Thanks.

Two major ISPs in China is horrible to deal with. Only few data center can reduce the delay. It’s hardware problem.
The other problem is one fucking policy which demands the site owner register their information.

It’s the only reason you may want to host anything in China. What’s worse, the bandwidth is more expensive than US.


(Matches) #5

O_O

Holy shit, that can’t possibly be correct. Surely you mean 10k-30k yen?


(Erick Guan) #6

Sorry, some updates. 100MB bandwith is about 1.2-2.8 yuan per year.