# Error when rebuild. Can't fetch from https://rubygems.org

**URL:** https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378
**Category:** Support
**Created:** [August 20, 2025, 12:57am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378 "2025-08-20T00:57:03Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![cuo\_wu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cuo_wu/32/498442_2.png) [@cuo\_wu](https://meta.discourse.org/u/cuo_wu)
#### Post date: [August 20, 2025, 12:57am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/1 "2025-08-20T00:57:03Z")

</div>

```plaintext
I, [2025-08-20T00:54:01.539535 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
Network error while fetching
https://rubygems.org/quick/Marshal.4.8/actionmailer-8.0.2.1.gemspec.rz
(Connection reset by peer - SSL_connect)
I, [2025-08-20T00:55:20.805323 #1] INFO -- : Fetching source index from https://rubygems.org/

I, [2025-08-20T00:55:20.805729 #1] INFO -- : Terminating async processes
I, [2025-08-20T00:55:20.805829 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/15/bin/postmaster -D /etc/postgresql/15/main pid: 45
I, [2025-08-20T00:55:20.805864 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 112
2025-08-20 00:55:20.805 UTC [45] LOG: received fast shutdown request
112:signal-handler (1755651320) Received SIGTERM scheduling shutdown...
2025-08-20 00:55:20.807 UTC [45] LOG: aborting any active transactions
2025-08-20 00:55:20.809 UTC [45] LOG: background worker "logical replication launcher" (PID 59) exited with exit code 1
2025-08-20 00:55:20.811 UTC [54] LOG: shutting down
2025-08-20 00:55:20.812 UTC [54] LOG: checkpoint starting: shutdown immediate
2025-08-20 00:55:20.823 UTC [54] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.008 s, sync=0.001 s, total=0.012 s; sync files=4, longest=0.001 s, average=0.001 s; distance=7 kB, estimate=7 kB
2025-08-20 00:55:20.857 UTC [45] LOG: database system is shut down
112:M 20 Aug 2025 00:55:20.858 # User requested shutdown...
112:M 20 Aug 2025 00:55:20.858 * Saving the final RDB snapshot before exiting.
112:M 20 Aug 2025 00:55:22.520 * DB saved on disk
112:M 20 Aug 2025 00:55:22.520 # Redis is now ready to exit, bye bye...

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3' failed with return #<Process::Status: pid 624 exit 17>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.3.0/lib/pups/exec_command.rb:131:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'", "su discourse -c 'bundle clean'", "su discourse -c 'find /var/www/discourse/vendor/bundle -name cache -not -path \"*/gems/*\" -type d -exec rm -rf {} +'", "su discourse -c 'find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +'"]}
bootstrap failed with exit code 17
---
HINT: The plugin 'discourse-solved' is now bundled with Discourse and should not be included in your container configuration.
Remove the line 'git clone https://github.com/discourse/discourse-solved' from your containers/app.yml file, then try again.
For more information, see https://meta.discourse.org/t/373574
---
**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.
af0ad4d6a7b7ec9f294c77b10703fd986bbd12e49b701b828199fc77ee643d61
root@LAMASTER:/var/discourse# 

```

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [August 20, 2025, 2:12am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/2 "2025-08-20T02:12:10Z")

</div>

> [@cuo\_wu](#):
>
> ```plaintext
> HINT: The plugin 'discourse-solved' is now bundled with Discourse and should not be included in your container configuration.
> Remove the line 'git clone https://github.com/discourse/discourse-solved' from your containers/app.yml file, then try again.
> 
> ```

Did you try doing this and running the rebuild again?

---

<div class="post-metadata">

### Author: ![cuo\_wu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cuo_wu/32/498442_2.png) [@cuo\_wu](https://meta.discourse.org/u/cuo_wu)
#### Post date: [August 20, 2025, 5:16am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/3 "2025-08-20T05:16:13Z")

</div>

Yes, Many times. 🤣 I try it for 10 hours.

---

<div class="post-metadata">

### Author: ![cuo\_wu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cuo_wu/32/498442_2.png) [@cuo\_wu](https://meta.discourse.org/u/cuo_wu)
#### Post date: [August 20, 2025, 5:17am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/4 "2025-08-20T05:17:18Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/1/5/4/154cf0c3bbe7b0bcae7653796275c88ed5403311.png)

---

<div class="post-metadata">

### Author: ![cuo\_wu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cuo_wu/32/498442_2.png) [@cuo\_wu](https://meta.discourse.org/u/cuo_wu)
#### Post date: [August 20, 2025, 5:18am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/5 "2025-08-20T05:18:20Z")

</div>

```plaintext
root@LAMASTER:~# curl -v https://rubygems.org
* Trying 151.101.1.227:443...
* Connected to rubygems.org (151.101.1.227) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* Send failure: Connection reset by peer
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* OpenSSL SSL_connect: Connection reset by peer in connection to rubygems.org:443 
* Closing connection 0
* Send failure: Broken pipe
curl: (35) Send failure: Connection reset by peer
root@LAMASTER:~# curl -v https://rubygems.org
* Trying 151.101.193.227:443...
* Connected to rubygems.org (151.101.193.227) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* Send failure: Connection reset by peer
* OpenSSL SSL_connect: Connection reset by peer in connection to rubygems.org:443 
* Closing connection 0
* Send failure: Broken pipe
curl: (35) Send failure: Connection reset by peer
root@LAMASTER:~#

```

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [August 20, 2025, 5:35am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/6 "2025-08-20T05:35:41Z")

</div>

Does this help?

> [@Replace rubygems.org with taobao mirror to resolve network error in China](https://meta.discourse.org/t/replace-rubygems-org-with-taobao-mirror-to-resolve-network-error-in-china/21988):
>
> [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" Bo…

---

<div class="post-metadata">

### Author: ![cuo\_wu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cuo_wu/32/498442_2.png) [@cuo\_wu](https://meta.discourse.org/u/cuo_wu)
#### Post date: [August 20, 2025, 6:40am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/7 "2025-08-20T06:40:33Z")

</div>

Thanks. I will try it. Actually, my server is in Los Angels.

---

<div class="post-metadata">

### Author: ![cuo\_wu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cuo_wu/32/498442_2.png) [@cuo\_wu](https://meta.discourse.org/u/cuo_wu)
#### Post date: [August 20, 2025, 6:42am UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/8 "2025-08-20T06:42:03Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/1/f/c/1fc003855869e54e83b5e7d2e7a445c2cc5ab046.png)

Network is fine. But SSL isn’t.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [August 20, 2025, 1:29pm UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/9 "2025-08-20T13:29:36Z")

</div>

Sorry, not sure how to help with this, it seems like an issue with your server or ISP. Is the SSL issue limited to `rubygems.org`, do you know?

---

<div class="post-metadata">

### Author: ![cuo\_wu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cuo_wu/32/498442_2.png) [@cuo\_wu](https://meta.discourse.org/u/cuo_wu)
#### Post date: [August 20, 2025, 2:18pm UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/10 "2025-08-20T14:18:58Z")

</div>

When I enable IPV6 it works. Thanks a lot.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 19, 2025, 2:19pm UTC](https://meta.discourse.org/t/error-when-rebuild-cant-fetch-from-https-rubygems-org/379378/11 "2025-09-19T14:19:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
