Skip to content

Instantly share code, notes, and snippets.

@guycall
Last active July 1, 2016 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guycall/430dca8985f56924e03a to your computer and use it in GitHub Desktop.
Save guycall/430dca8985f56924e03a to your computer and use it in GitHub Desktop.
#!/bin/sh
# Purpose: minimalistic provisioning of a fresh vagrant box ubuntu/trusty64 for
# rails development. Uses shell as the provisioner.
# More details https://docs.vagrantup.com/v2/provisioning/shell.html
# Original File: https://gist.github.com/guycall/430dca8985f56924e03a
# Ensure OS is up to date
sudo apt-get update
sudo apt-get dist-upgrade
# 14.04LTS has Ruby 1.9.3. 15.04 & above have Ruby 2.x
# Add brightbox repository to get newer versions of ruby
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
# Install newer Ruby
sudo apt-get install -y ruby2.3
# Needed for the json gem
sudo apt-get install -y ruby2.3-dev
# Needed by gems that build native extensions
sudo apt-get install -y build-essential
# Needed to build sqlite3 gem
sudo apt-get install -y libsqlite3-dev
# Needed to build mysql gem
sudo apt-get install -y libmysqlclient-dev
# Rails needs a JavaScript runtime
sudo apt-get install -y nodejs
# Install some essentials
sudo apt-get install -y git
sudo gem install bundler
# Install mysql client
sudo apt-get install -y mysql-client
# Currently manually installing mysql server
# since it prompts for root password
# There are ways to script a silent install
# sudo apt-get install mysql-server
echo 'Welcome! Install mysql-server, then go to your app folder and run: bundle install, rake db:create, etc.. '
# The MIT License (MIT)
#
# Copyright (c) 2015 https://github.com/guycall
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment