# Error rebuilding, bundler exits with code 137

**URL:** https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [June 26, 2016, 1:17pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463 "2016-06-26T13:17:08Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![OmJmr](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@OmJmr](https://meta.discourse.org/u/OmJmr)
#### Post date: [June 26, 2016, 1:17pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/1 "2016-06-26T13:17:08Z")

</div>

Hi

I got this error when I tried to rebuild app “./launcher rebuild app”

```
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 2243 exit 137>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
9a1115f500d5f32060a29064d9b24b0c858f8a511b6e8f5de6523ef0ce642551
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

I found no earlier messages when i scroll up.

I read other posts and I did not find an idea to my issue.

Please find below some params my setup:

```
docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 2
Server Version: 1.11.2
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 16
 Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge
Kernel Version: 3.13.0-32-generic
Operating System: Ubuntu 14.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 994.1 MiB
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

```

Version of postgressql is 9.3

Thanks for your help

Regards

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 26, 2016, 1:28pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/2 "2016-06-26T13:28:04Z")

</div>

> [@OmJmr](#):
>
> I found no earlier messages when i scroll up.

Can you paste the **whole** logs? The message might not look like an error to you.

---

<div class="post-metadata">

### Author: ![OmJmr](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@OmJmr](https://meta.discourse.org/u/OmJmr)
#### Post date: [June 26, 2016, 1:33pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/3 "2016-06-26T13:33:31Z")

</div>

I could find this at the bottom of the logs

```
I, [2016-06-26T13:07:14.955605 #13] INFO -- : Purging temp files

I, [2016-06-26T13:07:14.971916 #13] INFO -- : Terminating async processes
I, [2016-06-26T13:07:14.973216 #13] 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/9.3/bin/postmaster -D /etc/postgresql/9.3/main pid: 1471
I, [2016-06-26T13:07:14.975827 #13] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 1584
2016-06-26 13:07:14 UTC [1471-2] LOG: received fast shutdown request
2016-06-26 13:07:14 UTC [1471-3] LOG: aborting any active transactions
2016-06-26 13:07:14 UTC [1478-2] LOG: autovacuum launcher shutting down
1584:signal-handler (1466946434) Received SIGTERM scheduling shutdown...
2016-06-26 13:07:14 UTC [1475-1] LOG: shutting down
2016-06-26 13:07:15 UTC [1475-2] LOG: database system is shut down
1584:M 26 Jun 13:07:15.070 # User requested shutdown...
1584:M 26 Jun 13:07:15.070 * Saving the final RDB snapshot before exiting.
1584:M 26 Jun 13:07:15.083 * DB saved on disk
1584:M 26 Jun 13:07:15.084 # Redis is now ready to exit, bye bye...

```

Thanks

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 26, 2016, 1:34pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/4 "2016-06-26T13:34:29Z")

</div>

Like I said, can you paste the **whole** logs? Having bits and pieces isn’t helping much ☹

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 26, 2016, 2:18pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/10 "2016-06-26T14:18:50Z")

</div>

Can you use [http://pastebin.com/](http://pastebin.com/) to host the logs? It’s terribad here 😛

---

<div class="post-metadata">

### Author: ![OmJmr](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@OmJmr](https://meta.discourse.org/u/OmJmr)
#### Post date: [June 26, 2016, 2:28pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/11 "2016-06-26T14:28:46Z")

</div>

Of course : [http://pastebin.com/njpaPj9N](http://pastebin.com/njpaPj9N) 🙂

---

<div class="post-metadata">

### Author: ![OmJmr](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@OmJmr](https://meta.discourse.org/u/OmJmr)
#### Post date: [June 26, 2016, 3:33pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/12 "2016-06-26T15:33:29Z")

</div>

Could you see another error in the logs that can help to find what’s wrong ?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [June 26, 2016, 5:58pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/13 "2016-06-26T17:58:57Z")

</div>

Okay so bundler produced no output and exited with code 137. What’s that mean again?

Do you have a 2GB swap?

---

<div class="post-metadata">

### Author: ![OmJmr](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@OmJmr](https://meta.discourse.org/u/OmJmr)
#### Post date: [June 26, 2016, 9:03pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/14 "2016-06-26T21:03:12Z")

</div>

df -h  
Filesystem Size Used Avail Use% Mounted on  
udev 487M 90M 397M 19% /dev  
tmpfs 100M 396K 100M 1% /run  
/dev/disk/by-label/DOROOT 30G 5.2G 23G 19% /  
none 4.0K 0 4.0K 0% /sys/fs/cgroup  
none 5.0M 0 5.0M 0% /run/lock  
none 498M 1.1M 496M 1% /run/shm  
none 100M 0 100M 0% /run/user  
none 30G 5.2G 23G 19% /var/lib/docker/aufs/mnt/47bdee91f9edc503b004229b1cc4c38dfdefcbbc299feda8a065f6f6ba1608f3

df -i  
Filesystem Inodes IUsed IFree IUse% Mounted on  
udev 124528 7037 117491 6% /dev  
tmpfs 127239 712 126527 1% /run  
/dev/disk/by-label/DOROOT 1966080 199331 1766749 11% /  
none 127239 11 127228 1% /sys/fs/cgroup  
none 127239 1 127238 1% /run/lock  
none 127239 4 127235 1% /run/shm  
none 127239 2 127237 1% /run/user  
none 1966080 199331 1766749 11% /var/lib/docker/aufs/mnt/47bdee91f9edc503b004229b1cc4c38dfdefcbbc299feda8a065f6f6ba1608f3

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [June 26, 2016, 9:05pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/15 "2016-06-26T21:05:38Z")

</div>

Your disk usage looks fine. What does `free` say?

---

<div class="post-metadata">

### Author: ![OmJmr](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@OmJmr](https://meta.discourse.org/u/OmJmr)
#### Post date: [June 26, 2016, 9:33pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/16 "2016-06-26T21:33:08Z")

</div>

free  
total used free shared buffers cached  
Mem: 1017912 523444 494468 93448 112444 188520  
-/+ buffers/cache: 222480 795432  
Swap: 0 0 0

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [June 26, 2016, 9:53pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/17 "2016-06-26T21:53:04Z")

</div>

Your’re below the minimum RAM.  
Please set up a 2 GB swap file and try again.

---

<div class="post-metadata">

### Author: ![OmJmr](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@OmJmr](https://meta.discourse.org/u/OmJmr)
#### Post date: [June 26, 2016, 10:26pm UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/18 "2016-06-26T22:26:39Z")

</div>

ok done

free -m  
total used free shared buffers cached  
Mem: 994 927 66 17 2 58  
-/+ buffers/cache: 865 128  
Swap: 2047 160 1887

And everything works fine now !

Thanks

Regards

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 27, 2016, 2:15am UTC](https://meta.discourse.org/t/error-rebuilding-bundler-exits-with-code-137/46463/19 "2016-06-27T02:15:30Z")

</div>


