Mini_racer installation issues on ubuntu vagrant (OSX)

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

After that it’s more or less following this.


  • 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
  • and installing image_optim dependencies as described here so that pesky warnings disappear from running the specs.

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


Yes for sure! This is way better than vagrant!


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:

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.


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

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

Currently working my way through this one

1 Like

Honestly, it doesn’t make sense to have to install to a system each time. I frequently hop between systems and Vagrant has made developing incredibly easy - just vagrant up and go. No reason we can’t accomplish that here.

I’m well on my way to getting the image prepared with 16.04 server. Just configuring it now then I’ll upload.


I have submitted a pull request that results in a fully configured Discourse development environment.

The Ubuntu .box file is uploaded to dropbox, but can be adopted by @codinghorror or @sam for their own uses.


Well, I’ll admit I did a bit of muttering under my breath when my dev set up broke after the last upgrade.
(“a set up a few versions behind would be better than no set up at all” being one of the more polite thoughts)

Having used a Windows - Github - VirtualBox - Vagrant set up for over a year, I wasn’t too keen on getting something set up again.

I eventually installed VMware Player, downloaded the Ubuntu desktop iso and got that working.
Then it took a while to learn my way around Ubuntu. It sure ain’t the Windows UI that I’m used to.
Installed Docker, Cloned Discourse.
I struggled with getting Windows and Ubuntu to “talk” with each other for quite a while. Several failed “share” attempts later I finally installed VMware Tools and VMware Tools Desktop and managed to import and restore my last backup.

I still want to figure out the sound card issue, but after only a couple of days, I don’t miss Vagrant at all.
Many of the problems I had had with Vagrant for so long that I just accepted them as “thats the way it is” are gone. And working with VMware Player is very easy now that I’ve learned its UI.

For those still hanging on to Vagrant I recommend you give VMware a try.


I tried updating to trusty using do-release-upgrade, as @angus suggested.

Following the update and “restart”, I can’t use vagrantup`. It fails with:

Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant-root /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant-root /vagrant

The error output from the last command was:

stdin: is not a tty
/sbin/mount.vboxsf: mounting failed with the error: No such device

Edit: this is in Vagrant on an OSX system.

If you want to use vagrant, I suggest you use the updated virtual box provided by @tarek which has been merged into master. In other words, update to the latest on master and start with a new box.


Thanks Angus. I was rather trying to avoid having to start another box from scratch, but as I haven’t been able to troubleshoot the issue with my previous one, that looks like the only path. (I prefer fixing things when possible as it helps me understand how not to mess up again :slight_smile: )

1 Like

Unfortunately, in the new Vagrant mailcatcher doesn’t seem to work:

vagrant@discourse:/vagrant$ mailcatcher
/home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x512b9c mailcatcher-0.6.4> (NoMethodError)
	from /home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
	from /home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
	from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/mailcatcher-0.6.4/bin/mailcatcher:3:in `<top (required)>'
	from /home/vagrant/.rvm/gems/ruby-2.3.1/bin/mailcatcher:23:in `load'
	from /home/vagrant/.rvm/gems/ruby-2.3.1/bin/mailcatcher:23:in `<main>'
	from /home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
	from /home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'

(It’s probably OT, but I couldn’t find another topic about it, and it may be related to all of the above.)


Odd I know, but you have to run mailcatcher from your home directory. Try cd ~ and then mailcatcher --ip


Or use screen -m -c docs/vagrant.screen to start up all of the processes you could ever need, mail catcher, postgres, rails console and the rails server.

1 Like

Thanks for the pointer @tarek. @cpradio that’s a nice script right there :slight_smile:


I’m still (or all of a sudden) having trouble with mailcatcher again using the script you suggested. localhost:1080 doesn’t work, even though the Discourse site loads normally. And, AFAICT, everything else (e.g., Sidekiq) runs normally.

(Side note: this stuff is such a moving target.)

Yes, mailcatcher has changed. Either now it needs two – before IP or one -. I forget at the moment, but was planning on fixing it and sending a PR when I had a chance.

Does the following work?

mailcatcher --foreground --http-ip

Actually, mailcatcher is working fine from vagrant for me (not sure if you are using vagrant). But that is where the screen command comes in. Also, if you are using vagrant, you access it via localhost:4080 not localhost:1080.


D’oh! I was using the wrong port. mailcatcher --ip works fine at localhost:4080. :flushed: