Skip to content

Instantly share code, notes, and snippets.

@nbfritz
Last active August 29, 2015 14:24
Show Gist options
  • Save nbfritz/6ef7a12bfe366c216714 to your computer and use it in GitHub Desktop.
Save nbfritz/6ef7a12bfe366c216714 to your computer and use it in GitHub Desktop.
Rails Dev Environment vagrant file
sudo apt-get update
sudo apt-get install -y git tmux vim autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev sqlite3 libsqlite3-dev
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install -y elixir
rbenv install 2.2.2 && rbenv global 2.2.2
gem install bundler pry
cd /vagrant && bundle install
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'gem: --no-rdoc --no-ri' > ~/.gemrc
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/vivid64"
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
# common installation
config.vm.provision "shell", path: "https://gist.githubusercontent.com/nbfritz/6ef7a12bfe366c216714/raw/caafd4b4603b5685c05fdd72dd11cda969d3c65d/common-settings.sh"
# install rbenv
config.vm.provision "shell", privileged: false, path: "https://gist.githubusercontent.com/nbfritz/6ef7a12bfe366c216714/raw/5b580ef347682f76866fec065c67c16a2278e893/rbenv-install.sh"
# install ruby and bundle
#config.vm.provision "shell", privileged: false, path: "https://gist.githubusercontent.com/nbfritz/6ef7a12bfe366c216714/raw/192ef06088f36283df5d5d59f11c00be5666731e/install-ruby-rails.sh"
# install elixir
#config.vm.provision "shell", privileged: false, path: "https://gist.githubusercontent.com/nbfritz/6ef7a12bfe366c216714/raw/d45720240b13a4c6bf7577f0d1575dc85506bdcf/elixir-install.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment