Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Build with Vagrant
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.
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
- Install git if you don't have it.
- Clone the Shoes3 repository
git clone https://github.com/shoes/shoes3.gitif you haven't already. Change directory into the shoes3 directory.
- If you cloned Shoes, you should have a working Vagrantfile so skip the next step.
- 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| empty.vm.box = "bento/ubuntu-16.04" end config.vm.define "lin" do |lin| lin.vm.box = "shoes3/linux" end config.vm.define "win" do |win| win.vm.box = "shoes3/windows" end config.vm.define "rpi" do |rpi| rpi.vm.box = "shoes3/raspberry" end config.vm.define "osx" do |osx| osx.vm.box = "shoes3/darwin14" end config.vm.provider "virtualbox" do |vb| # vb.gui = true # Customize the amount of memory on the VM: vb.memory = "2048" end end
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.
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:
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 rake package logout
rake setup:mxe or
rake setup:darwin14 or
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.