Mini_racer causing rebuild fail

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.
1 Like

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

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?

1 Like

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

1 Like

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.

Complete output is available here:
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?

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
1 Like

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

2 Likes

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. 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

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

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

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

3 Likes

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

5 Likes