Skip to content

Instantly share code, notes, and snippets.

@josephwegner
Created May 13, 2015 20:10
Show Gist options
  • Save josephwegner/b45755777af4ccbfb8ff to your computer and use it in GitHub Desktop.
Save josephwegner/b45755777af4ccbfb8ff to your computer and use it in GitHub Desktop.
Vagrant environment for pushpop tests
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.provision :shell, path: "vagrantstrap.sh";
end
#!/usr/bin/env bash
apt-get update
# This one is just cause I'm lazy
apt-get -y install vim
apt-get -y install git
apt-get -y install build-essential
# Set up ruby
git clone https://github.com/sstephenson/rbenv.git /home/vagrant/.rbenv
export RBENV_ROOT="/home/vagrant/.rbenv"
export PATH="/home/vagrant/.rbenv/bin:$PATH"
rbenv init
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> /home/vagrant/.bash_profile
echo 'eval "$(rbenv init -)"' >> /home/vagrant/.bash_profile
git clone https://github.com/sstephenson/ruby-build.git /home/vagrant/.rbenv/plugins/ruby-build
rbenv install 2.0.0-p645
rbenv rehash
rbenv global 2.0.0-p645
chown -R vagrant:vagrant /home/vagrant/.rbenv
RBENV_RUBY_BIN="$(rbenv which gem)"
$RBENV_RUBY_BIN install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment