# Mini\_racer causing rebuild fail

**URL:** https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231
**Category:** Bug
**Created:** [October 30, 2016, 2:31pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231 "2016-10-30T14:31:15Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![jesselperry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jesselperry/32/119501_2.png) [@jesselperry](https://meta.discourse.org/u/jesselperry)
#### Post date: [October 30, 2016, 2:31pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/1 "2016-10-30T14:31:15Z")

</div>

Hi there -

I tried to upgrade and it didn’t work through the Admin interface, so I tried the ol’ ./launcher rebuild app and that failed too

I get this message right before it fails. This happens after server reboot too. Any tips?

```
An error occurred while installing mini_racer (0.1.3), and Bundler cannot
continue.
Make sure that `gem install mini_racer -v '0.1.3'` succeeds before bundling.

```

---

<div class="post-metadata">

### Author: ![jesselperry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jesselperry/32/119501_2.png) [@jesselperry](https://meta.discourse.org/u/jesselperry)
#### Post date: [October 30, 2016, 2:52pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/2 "2016-10-30T14:52:59Z")

</div>

Ok turns out it’s a problem with the beta branch of Discourse. I update using the beta branch (not the default of tests-passed). I noticed this recent change to update mini\_racer:  
[https://github.com/discourse/discourse/commit/55e33414bbea88d0ba8a3d11fbebccba65e76336](https://github.com/discourse/discourse/commit/55e33414bbea88d0ba8a3d11fbebccba65e76336)

So that tipped me off to switching back over to tests-passed, and it worked for me then. Maybe time to update the beta branch to a new beta version?

---

<div class="post-metadata">

### Author: ![helperhaps](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/helperhaps/32/59201_2.png) [@helperhaps](https://meta.discourse.org/u/helperhaps)
#### Post date: [November 1, 2016, 9:23am UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/3 "2016-11-01T09:23:02Z")

</div>

I am on stable branch. Now I’m facing this issue

---

<div class="post-metadata">

### Author: ![Alex\_Harrington](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_harrington/32/249857_2.png) [@Alex\_Harrington](https://meta.discourse.org/u/Alex_Harrington)
#### Post date: [November 3, 2016, 8:27am UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/4 "2016-11-03T08:27:32Z")

</div>

I’m trying to rebuild 1.6.5 after the web-upgrade from 1.6.4 to it failed, and have the same issue:

```
 An error occurred while installing mini_racer (0.1.3), and Bundler cannot continue.
 Make sure that `gem install mini_racer -v '0.1.3'` succeeds before bundling.

```

---

<div class="post-metadata">

### Author: ![Alex\_Harrington](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_harrington/32/249857_2.png) [@Alex\_Harrington](https://meta.discourse.org/u/Alex_Harrington)
#### Post date: [November 3, 2016, 8:38am UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/5 "2016-11-03T08:38:40Z")

</div>

Complete output is available here:  
[http://pastebin.com/k4L0nXYG](http://pastebin.com/k4L0nXYG)

Currently my site is down and I can’t find a way to get it running again.

I tried changing version in the app.yaml file to 1.6.4 as I saw suggested in another post but I see the same issue there. I’ve changed it back to stable for now.

When I did the app rebuild the first time, it pulled a new Docker container image down, so I wonder if that has something in it that’s causing this to break? Is there a way I can roll back to the old container?

---

<div class="post-metadata">

### Author: ![Alex\_Harrington](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_harrington/32/249857_2.png) [@Alex\_Harrington](https://meta.discourse.org/u/Alex_Harrington)
#### Post date: [November 3, 2016, 11:57am UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/6 "2016-11-03T11:57:03Z")

</div>

Just out of curiosity, I started a fresh Ubuntu 14.04 virtual machine and installed Discourse, following the quick install guide. The only change I made to the app.yml after running the config tool was to choose the stable branch, and when I then bootstrap the container, I get the same errors as in my previous post - so it appears it’s not possible to install a stable series Discourse any longer?

I’m hesitant to move to tests-passed since we have plugins which track the stable series so may not work on the latest and greatest.

Editing launcher line 67 from

```
image=discourse/discourse:1.3.7

```

to

```
image=discourse/discourse:1.3.6

```

allows the container to bootstrap, so I’m going to try that now on my production box. I’m not sure if there is any negative implication with using the older container file, but it does point to the problem being in that area.

**Update**  
Changing to container 1.3.6 got my production box back up and running with

```
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [November 3, 2016, 12:08pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/7 "2016-11-03T12:08:51Z")

</div>

@falco this is a bit odd, can you have a quick look at this, why is the old bundle lock not installing?

---

<div class="post-metadata">

### Author: ![robbo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbo/32/115517_2.png) [@robbo](https://meta.discourse.org/u/robbo)
#### Post date: [November 3, 2016, 5:10pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/8 "2016-11-03T17:10:41Z")

</div>

Same issue for me, fails here. `mini_racer_extension.cc:4:24: fatal error: include/v8.h: No such file or directory`.

Did what is says here [bundle install error (fatal error: include/v8.h: No such file or directory) · Issue #37 · rubyjs/mini\_racer · GitHub](https://github.com/discourse/mini_racer/issues/37). Never worked, the error recommended installing 0.1.3 and I just did latest instead and it worked (after uninstalling `libv8` from that issue so not sure if related).

**And doesn’t work with a rebuild after because it wants to do 0.1.3 and fails.**

EDIT: running with the 1.3.6 image… done and working, now to do this with 3 more servers JUST to update mail settings _sigh_

* * *

Full log from running it within the docker container:

> root@web01-prd-us-east1-c-[deleted]-app:/var/www/discourse# gem install mini\_racer -v ‘0.1.3’  
> Fetching: libv8-5.3.332.38.1-x86\_64-linux.gem (100%)  
> Successfully installed libv8-5.3.332.38.1-x86\_64-linux  
> Fetching: mini\_racer-0.1.3.gem (100%)  
> Building native extensions. This could take a while…  
> ERROR: Error installing mini\_racer:  
> ERROR: Failed to build gem native extension.

> ```
> current directory: /usr/local/lib/ruby/gems/2.3.0/gems/mini_racer-0.1.3/ext/mini_racer_extension
> 
> ```
> 
> /usr/local/bin/ruby -r ./siteconf20161103-425-359b4x.rb extconf.rb  
> checking for main() in -lpthread… yes  
> creating Makefile

> To see why this extension failed to compile, please check the mkmf.log which can be found here:

> /usr/local/lib/ruby/gems/2.3.0/extensions/x86\_64-linux/2.3.0-static/mini\_racer-0.1.3/mkmf.log

> current directory: /usr/local/lib/ruby/gems/2.3.0/gems/mini\_racer-0.1.3/ext/mini\_racer\_extension  
> make “DESTDIR=” clean

> current directory: /usr/local/lib/ruby/gems/2.3.0/gems/mini\_racer-0.1.3/ext/mini\_racer\_extension  
> make “DESTDIR=”  
> compiling mini\_racer\_extension.cc  
> mini\_racer\_extension.cc:4:24: fatal error: include/v8.h: No such file or directory  
> compilation terminated.  
> Makefile:206: recipe for target ‘mini\_racer\_extension.o’ failed  
> make: \*\*\* [mini\_racer\_extension.o] Error 1

> make failed, exit code 2

> Gem files will remain installed in /usr/local/lib/ruby/gems/2.3.0/gems/mini\_racer-0.1.3 for inspection.  
> Results logged to /usr/local/lib/ruby/gems/2.3.0/extensions/x86\_64-linux/2.3.0-static/mini\_racer-0.1.3/gem\_make.out

---

<div class="post-metadata">

### Author: ![zsero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zsero/32/64016_2.png) [@zsero](https://meta.discourse.org/u/zsero)
#### Post date: [November 3, 2016, 5:51pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/9 "2016-11-03T17:51:49Z")

</div>

Same issue for me as well. I was on stable, and couldn’t upgrade from 1.6.4 to 1.6.5 because of this issue. Now my forum is down.  
[https://meta.discourse.org/t/cannot-upgrade-1-6-4-1-6-5/52407?u=zsero](https://meta.discourse.org/t/cannot-upgrade-1-6-4-1-6-5/52407)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 3, 2016, 6:00pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/10 "2016-11-03T18:00:53Z")

</div>

OK guys, I’m looking into this right now.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [November 3, 2016, 6:17pm UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/11 "2016-11-03T18:17:52Z")

</div>

We can back port the mini racer upgrade, it is safe

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 4, 2016, 12:03am UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/12 "2016-11-04T00:03:11Z")

</div>

Ok, the stable branch is working now, just tested in a brand new Digital Ocean droplet.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [November 4, 2016, 12:58am UTC](https://meta.discourse.org/t/mini-racer-causing-rebuild-fail/52231/13 "2016-11-04T00:58:20Z")

</div>


