Mini_racer installation issues on ubuntu vagrant (OSX)

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.

5 Likes

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.

11 Likes

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.

5 Likes

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.

4 Likes

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

2 Likes

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

2 Likes

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:

2 Likes

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 0.0.0.0

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.

3 Likes

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

2 Likes