Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Last active July 21, 2016 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Lewiscowles1986/48999ebe1b1e7a1fce9f to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/48999ebe1b1e7a1fce9f to your computer and use it in GitHub Desktop.
Debian / Ubuntu get ruby on rails
#!/bin/bash
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --rails
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.31.17"
config.vm.hostname = "rails.demo"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
# vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "1024"
# Customize the cpu cores
vb.cpus = "2"
end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update -qq
wget https://gist.github.com/Lewiscowles1986/48999ebe1b1e7a1fce9f/raw/get-rails.sh
chmod +x get-rails.sh
sudo -H -u vagrant ./get-rails.sh
SHELL
end
@Lewiscowles1986
Copy link
Author

to use debian change ubuntu/trusty64 to debian/jessie64. Mostly as it relies on the rvm script to do a lot of the work it probably works on non-debian distro's, but I won't run them so meh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment