# Mini\_racer installation issues on ubuntu vagrant (OSX)

**URL:** https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681
**Category:** Development
**Created:** [5월 23, 2016, 3:26오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681 "2016-05-23T15:26:44Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [5월 23, 2016, 3:26오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/1 "2016-05-23T15:26:44Z")

</div>

@sam I’m consistenly getting this error when running `bundle install` after [therubyracer was replaced with mini\_racer](https://github.com/discourse/discourse/commit/695773db1c3af0142a92cc25d4fe6e852b71e698).

```plaintext
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.2 -r ./siteconf20160523-1400-1x811sw.rb extconf.rb
checking for main() in -lpthread... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling mini_racer_extension.cc
In file included from mini_racer_extension.cc:4:0:
/var/lib/gems/2.2.0/gems/libv8-5.0.71.48.3-x86-linux/vendor/v8/include/v8.h:341:1: error: expected unqualified-id before ‘using’
/var/lib/gems/2.2.0/gems/libv8-5.0.71.48.3-x86-linux/vendor/v8/include/v8.h:477:1: error: expected unqualified-id before ‘using’
/var/lib/gems/2.2.0/gems/libv8-5.0.71.48.3-x86-linux/vendor/v8/include/v8.h:871:1: error: expected unqualified-id before ‘using’
mini_racer_extension.cc:136:51: error: ‘Handle’ has not been declared
mini_racer_extension.cc:136:57: error: expected ‘,’ or ‘...’ before ‘<’ token
mini_racer_extension.cc: In function ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’:
mini_racer_extension.cc:140:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:144:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:148:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:152:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:156:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:160:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:165:55: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:171:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:175:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:184:53: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:186:57: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:193:26: error: ‘value’ was not declared in this scope
mini_racer_extension.cc: At global scope:
mini_racer_extension.cc:197:8: error: ‘Handle’ does not name a type
mini_racer_extension.cc: In function ‘VALUE rb_context_eval_unsafe(VALUE, VALUE)’:
mini_racer_extension.cc:299:61: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:306:63: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:348:56: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc: In function ‘void* gvl_ruby_callback(void*)’:
mini_racer_extension.cc:396:2: error: ‘Handle’ was not declared in this scope
mini_racer_extension.cc:396:17: error: expected primary-expression before ‘>’ token
mini_racer_extension.cc:396:19: error: ‘external’ was not declared in this scope
mini_racer_extension.cc:396:45: error: expected primary-expression before ‘>’ token
mini_racer_extension.cc:396:46: error: ‘::Cast’ has not been declared
mini_racer_extension.cc:409:65: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:430:2: error: ‘Handle’ was not declared in this scope
mini_racer_extension.cc:430:14: error: expected primary-expression before ‘>’ token
mini_racer_extension.cc:430:16: error: ‘v8_result’ was not declared in this scope
mini_racer_extension.cc:430:73: error: ‘convert_ruby_to_v8’ was not declared in this scope
make: *** [mini_racer_extension.o] Error 1

make failed, exit code 2

Gem files will remain installed in /tmp/bundler20160523-1400-1fbh6n7/mini_racer-0.1.3/gems/mini_racer-0.1.3 for inspection.
Results logged to /tmp/bundler20160523-1400-1fbh6n7/mini_racer-0.1.3/extensions/x86-linux/2.2.0/mini_racer-0.1.3/gem_make.out
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: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [5월 23, 2016, 3:35오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/2 "2016-05-23T15:35:34Z")

</div>

~~Do you use homebrew? I would suggest the same trick for therubyracer:~~

It’s for native OS X environment without vagrant:

```bash
brew install v8
gem uninstall libv8
gem install libv8 -v '5.0.71.48.3' -- --with-system-v8

```

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [5월 23, 2016, 3:44오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/3 "2016-05-23T15:44:56Z")

</div>

@fantasticfears Thanks for the suggestion, but uninstalling and re-installing libv8 hasn’t fixed it. Note that this is actually a virtual ubuntu environment.

---

<div class="post-metadata">

### Author: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [5월 23, 2016, 4:07오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/4 "2016-05-23T16:07:16Z")

</div>

Er, sorry, missed that. That could be a little tricky. Ubuntu doesn’t deliver a new v8. Some PPA offers 5.1 but it doesn’t match libv8 version. Compiler errors might be some flags or gcc version issues.

But libv8 has binary distributions. The command in below should help. `x86_64-linux` or `x86-linux` depends on ubuntu installation.  
`gem install libv8 -v '5.0.71.48.3' --platform=x86_64-linux`

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [5월 23, 2016, 4:41오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/5 "2016-05-23T16:41:12Z")

</div>

Thanks.

Updating the virtual Ubuntu env from Precise to Trusty fixes the issue.

The [discourse virtual box in s3](http://discourse-vms.s3.amazonaws.com/discourse-1.3.0.box) may need to be updated from Precise to Trusty. cp. [updated travis config](https://github.com/discourse/discourse/commit/9285168aa433c24db86a4c89e69d2c08a127c121).

cc @sam

---

<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: [5월 23, 2016, 9:03오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/6 "2016-05-23T21:03:49Z")

</div>

Oh my god , don’t get me started on vagrant, this may be the straw that breaks my back and gets me to delete it from the repo

Precise is ending its life early next year we are just about to ship xenial to all our customers, our developers get precise which is 8 releases behind

Which is why we should never ship dev environments we do not actively use

---

<div class="post-metadata">

### Author: ![runofthemill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/runofthemill/32/56919_2.png) [@runofthemill](https://meta.discourse.org/u/runofthemill)
#### Post date: [5월 25, 2016, 2:08오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/7 "2016-05-25T02:08:29Z")

</div>

@angus how did you get it to work? I tried changing `config.vm.box = 'discourse/discourse-1.3.0'` to `config.vm.box = 'ubuntu/trusty64'` and removing `config.vm.box_url`, but then ran into authentication problems on `vagrant up`.

---

<div class="post-metadata">

### Author: ![runofthemill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/runofthemill/32/56919_2.png) [@runofthemill](https://meta.discourse.org/u/runofthemill)
#### Post date: [5월 25, 2016, 2:10오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/8 "2016-05-25T02:10:05Z")

</div>

what’s the “preferred” method for developing Discourse on OSX?

---

<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: [5월 25, 2016, 2:20오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/9 "2016-05-25T02:20:34Z")

</div>

When I develop on OSX I use rbenv Postgres app and brew based redis

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [5월 26, 2016, 12:32오후 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/10 "2016-05-26T12:32:14Z")

</div>

I just ran `do-release-upgrade` in the virtual ubuntu environment. It takes you through the upgrade to Trusty.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [5월 30, 2016, 5:47오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/11 "2016-05-30T05:47:21Z")

</div>

> [@sam](#):
>
> delete it from the repo

What alternative to Vagrant would you suggest? i.e. instead of

Windows / GitHub / VirtualBox / Vagrant

---

<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: [5월 30, 2016, 6:02오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/12 "2016-05-30T06:02:52Z")

</div>

I use vmware, virtualbox should do the trick or the built in virtualization.

---

<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: [6월 1, 2016, 6:12오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/13 "2016-06-01T06:12:46Z")

</div>

Ok, stopped being the lazy I am and set up a properly development environment, without vagrant shenanigans, and my god it’s fast.

And it’s way easier than I anticipated.

---

<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: [6월 1, 2016, 6:13오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/14 "2016-06-01T06:13:27Z")

</div>

On what OS? Did you follow one of our #howto topics, did that work OK?

---

<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: [6월 1, 2016, 6:19오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/15 "2016-06-01T06:19:24Z")

</div>

Just formated one of my disks, using Gnome Ubuntu 16.04.

After that it’s more or less following [this](https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md).

Just:

- changing ruby version (2.0.0-turbo → 2.3.1)
- postgresql verison (9.3 → 9.5)
- creating the databases with my user as owner
- using a [ppa for redis](https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server)
- and installing image\_optim dependencies as described [here](https://github.com/toy/image_optim/blob/master/README.markdown) so that pesky warnings disappear from running the specs.

---

<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: [6월 1, 2016, 6:26오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/16 "2016-06-01T06:26:41Z")

</div>

Should we update that? Can you PR changes and I will add them?

---

<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: [6월 1, 2016, 6:35오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/17 "2016-06-01T06:35:23Z")

</div>

Yes for sure! This is way better than vagrant!

---

<div class="post-metadata">

### Author: ![tarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tarek/32/124831_2.png) [@tarek](https://meta.discourse.org/u/tarek)
#### Post date: [6월 2, 2016, 10:05오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/18 "2016-06-02T10:05:02Z")

</div>

I’m in the process of setting up a dev environment on a new system and ran across this thread after a problem with mini\_racer - I’m using GNU/Linux.

While I agree with @Falco that developing natively is faster, I think the advantages of Vagrant are huge and should be preserved.

I’m in the process of making an image that uses Ubuntu 16.04 (based on 16.04 Server iso) and has a few steps fixed. I’ll submit it when done.

Also, I am modifying the Vagrantfile with the following:

- Removing the NFS dependency (it confuses GNU/Linux hosts, and is not necessary as far as I can tell)
- Adds instructions from _[Discourse as your first Rails app](http://blog.discourse.org/2013/04/discourse-as-your-first-rails-app/)_ and _[Preparing a fresh Ubuntu install](https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md)_ so they are run when Vagrant provisions the first time

The end result will be a fully functional discourse when the person first types `vagrant up`.

I’ll submit it as a PR when ready. I’ll upload the image to a public dropbox, though obviously it would be better if somebody from discourse uploaded it where the old image is.

---

<div class="post-metadata">

### Author: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [6월 2, 2016, 10:16오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/19 "2016-06-02T10:16:41Z")

</div>

You could also check Docker image file for provisioning right version as Vagrant is meant to uniform production & dev env 🙂

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [6월 2, 2016, 10:53오전 UTC](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681/20 "2016-06-02T10:53:26Z")

</div>

Your not the only one that has had issues so welcome this 🙂

Currently working my way through this one

> [@Install Discourse on Ubuntu or Debian for Development](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727):
>
> warning This guide covers installation instructions in a development environment. For a production guide see: [Install Discourse in production with the official supported instructions](https://meta.discourse.org/t/how-to-install-discourse-in-production/142537) So you want to set up Discourse on Ubuntu or Debian to hack on and develop with? We’ll assume that you work locally and don’t have Ruby/Rails/Postgres/Redis installed on your Ubuntu or Debian system. Let’s begin! Requirements We suggest having at least 4 GB RAM and 2 CPU cores. Current compatibility: O…

[Next page](https://meta.discourse.org/t/mini-racer-installation-issues-on-ubuntu-vagrant-osx/44681.md?page=2)
