Last active
December 26, 2015 15:49
-
-
Save benforeva/7174971 to your computer and use it in GitHub Desktop.
A vagrantfile that sets up ruby for a development environment on Ubuntu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<SCRIPT | |
echo I am provisioning... | |
date > /etc/vagrat_provisioned_at | |
echo installing git... | |
sudo apt-get update | |
sudo apt-get install -y git-core | |
echo installing curl... | |
sudo apt-get install -y curl | |
echo installing library dependencies... | |
sudo apt-get install -y libxslt-dev | |
sudo apt-get install -y libxml2-dev | |
sudo apt-get install -y libpq-dev | |
echo installing ruby 2.1 using brightbox ppa | |
sudo apt-get install -y python-software-properties | |
sudo apt-add-repository -y ppa:brightbox/ruby-ng | |
sudp apt-get update | |
sudo apt-get install -y ruby2.1 | |
echo end of provisioning | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "precise32" | |
# config.vm.hostname = "RubyonRails" | |
config.vm.provision :shell, :inline => $script | |
config.vm.network :forwarded_port, guest: 3000, host: 3001 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added ruby installation as shown in http://www.pinupgeek.com/Brightbox-Ruby-2.1-Ubuntu-Packages/. Don't see the need for rvm for vagrant development environments.