Last active
October 22, 2021 20:00
-
-
Save floehopper/3bfa23166e83c84c2922c2f7e1e2f2cb to your computer and use it in GitHub Desktop.
Ubuntu Xenial with Ruby installed via rbenv
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
PROVISION_SYSTEM = <<~EOS | |
set -e | |
apt-get update --yes | |
apt-get install --yes gcc | |
apt-get install --yes make | |
EOS | |
PROVISION_USER = <<~EOS | |
set -e | |
mkdir -p ~/.rbenv | |
cd ~/.rbenv | |
git init | |
git remote add -f -t master origin https://github.com/rbenv/rbenv.git | |
git checkout -b master origin/master | |
mkdir -p ~/.rbenv/plugins | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
rbenv install ruby-2.6.3 | |
rbenv global ruby-2.6.3 | |
EOS | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'ubuntu/xenial64' | |
config.vm.box_version = '20170914.2.0' | |
config.vm.provision :shell, inline: PROVISION_SYSTEM | |
config.vm.provision :shell, privileged: false, inline: PROVISION_USER | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment