Skip to content

Instantly share code, notes, and snippets.

@tbrosman
Last active December 27, 2015 18:09
Show Gist options
  • Save tbrosman/7367254 to your computer and use it in GitHub Desktop.
Save tbrosman/7367254 to your computer and use it in GitHub Desktop.
Vagrantfile for a clean Ruby dev environment with bundler, make, git, etc. and a port open for testing.
# -*- mode: ruby -*-
# vi: set ft=ruby :
$install_dev_tools = <<SCRIPT
apt-get update -y
apt-get install curl libcurl4-openssl-dev make git -y
# Install Ruby through apt, but bundler through gem to avoid Ruby version conflicts
apt-get install ruby1.9.3 -y
gem install bundler
gem install debugger
SCRIPT
Vagrant.configure("2") do |config|
# Base box
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
# Ports for testing
config.vm.network "forwarded_port", guest: 8080, host: 8080
# Provision and start
config.vm.provision "shell", inline: $install_dev_tools
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment