bootstrap.sh
# Shell file taken at: https://github.com/rails/rails-dev-box
function install {
echo installing $1
shift
apt-get -y install "$@" >/dev/null 2>&1
}
echo updating package information
export DEBIAN_FRONTEND=noninteractive
curl -sSL "https://ftp-master.debian.org/keys/archive-key-7.0.asc" | sudo -E apt-key add -
echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list > /dev/null
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.3 ruby2.3-dev
update-alternatives --set ruby /usr/bin/ruby2.3 >/dev/null 2>&1
update-alternatives --set gem /usr/bin/gem2.3 >/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 createdb -O postgres xylem_test
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
echo 'ready to roll out'