Skip to content

Build with Vagrant

Cecil Coupe edited this page Jan 16, 2019 · 3 revisions

What is Vagrant?

Vagrant is like a VirtualMachine manager with some extra stuff. In fact, a Vagrant Box depends on a Virtual Machine (VM). Shoes has some vagrant boxes. Each box builds a version of Shoes for a certain platform. If you have Vagrant and Oracles VirtualBox (VB) installed on your system, you can easily build Shoes for your platform and most of the other platforms Shoes supports. Without dealing with dependencies or having the correct compilers - those are in the Vagrant box.

A word of caution, please. You can build say, Shoes for OSX but you can't run it unless you have an OSX box. You can run Shoes/Windows with out a Windows box. Something you might not think about - you can build binary gems for those other boxes too but that's harder to do than Shoes and not covered here.

Install Vagrant

Windows users - Please Read.


Go to Oracle's site and download VirtualBox. Get the extensions pack if available.


Go to Vagrant's site and download and install Vagrant.

Shoes and Vagrant

  1. Install git if you don't have it.
  2. Clone the Shoes3 repository git clone if you haven't already. Change directory into the shoes3 directory.
  3. If you cloned Shoes, you should have a working Vagrantfile so skip the next step.
  4. Option: Create a Vagrantfile. I'd copy this one and save as shoes3/Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.define "empty" do |empty| = "bento/ubuntu-16.04"
  config.vm.define "lin" do |lin| = "shoes3/linux"
  config.vm.define "win" do |win| = "shoes3/windows"
  config.vm.define "rpi" do |rpi| = "shoes3/raspberry"
  config.vm.define "osx" do |osx| = "shoes3/darwin14"
  config.vm.provider "virtualbox" do |vb|
    # vb.gui = true
    # Customize the amount of memory on the VM:
    vb.memory = "2048"

You're almost done.

Build Shoes with a vagrant box

vagrant up win or 'lin' or 'osx' or 'rpi' That downloads a Vagrant box, installs it into VirtualBox, starts the VM and creates a shared folder of you current directory (shoes3 - right?). It takes a while to download the box if this is the first time and it takes a few minutes to get the VM started. Any errors will be highlighted.

Now just vagrant ssh win or osx or whichever box you brought up. Note: Windows users - you probably have to do the putty thing here. You should get a prompt, and be in /home/vagrant. Congratulations! You're terminal is in a Linux box now. Connect to the shared directory: cd /vagrant, ls. Looks like your shoes3 directory doesn't it?

Because you are running Linux you'll get the Linux list of tasks from rake -T Note: the task or target names may not match the name of the vagrant box - but it's close enough for a good guess.

rake setup:lin64
rake package

Or rake setup:mxe or rake setup:darwin14 or rake setup:xrpi

Note: We don't have a working vagrant for freebsd. Freebsd does not support the Virtualbox shared folder protocols. It could be done with an nfs setup but those are highly unique and problematic.

Clone this wiki locally
You can’t perform that action at this time.