Skip to content

Instantly share code, notes, and snippets.

@iamvery
Created June 17, 2015 21:55
Show Gist options
  • Save iamvery/ccf0d6b60095c5ad5b2b to your computer and use it in GitHub Desktop.
Save iamvery/ccf0d6b60095c5ad5b2b to your computer and use it in GitHub Desktop.
# The output of all these installation steps is noisy. With this utility
# the progress report is nice and concise.
function install {
echo installing $1
shift
apt-get -y install "$@" >/dev/null 2>&1
}
echo updating package information
apt-add-repository -y ppa:brightbox/ruby-ng >/dev/null 2>&1
apt-get -y update >/dev/null 2>&1
install 'development tools' build-essential
install Ruby ruby2.2 ruby2.2-dev
update-alternatives --set ruby /usr/bin/ruby2.2 >/dev/null 2>&1
update-alternatives --set gem /usr/bin/gem2.2 >/dev/null 2>&1
echo installing Bundler
gem install bundler -N >/dev/null 2>&1
install Git git
install SQLite sqlite3 libsqlite3-dev
install PostgreSQL postgresql postgresql-contrib libpq-dev
sudo -u postgres createuser --superuser vagrant
install 'Nokogiri dependencies' libxml2 libxml2-dev libxslt1-dev
# Needed for docs generation.
update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.provision :shell, path: 'bootstrap.sh', keep_color: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment