Last active
December 13, 2015 23:29
-
-
Save hayesr/4991645 to your computer and use it in GitHub Desktop.
Fresh Ubuntu to Rails ready, on VirtualBox
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
# Virtual Box Instructions | |
# -------------------------------- | |
# 1. Install VirtualBox Oracle VM VirtualBox Extension Pack. | |
# 2. Install deps for Guest Additions | |
sudo apt-get install dkms build-essential linux-headers-$(uname -r) | |
# 3. Install Guest Additions (from CD) | |
sh ./VBoxLinuxAdditions.run | |
# 3D support from this answer: http://askubuntu.com/a/214968 | |
# I had the disappearing window problem, so I changed the order | |
# because installing stuff is hard when you can't see. | |
# 4. Add the vboxvideo driver to the instance by running: | |
sudo bash -c 'echo vboxvideo >> /etc/modules' | |
# 5. Install the CompizConfig Settings Manager: | |
sudo apt-get install compizconfig-settings-manager | |
# 6. Shutdown VM, enable 3D | |
# Test Compat: | |
/usr/lib/nux/unity_support_test -p | |
# If disappearing windows, run CompizConfig Setting Manager, | |
# Under OpenGL, uncheck 'Framebuffer Object' | |
ccsm | |
# Poof, unity works. No need for restart. | |
# RVM & Ruby | |
# -------------------------------- | |
# 1. Install Curl | |
sudo apt-get install curl | |
# 2. Install RVM (Ruby Version Manager) | |
curl -L https://get.rvm.io | bash -s stable | |
# 3. Make sure .bash_profile is sourced in .bashrc | |
echo "source .bash_profile" >> .bashrc | |
# 4. Find out what RVM needs and install (this command gives directions) | |
rvm requirements | |
# I did: | |
# sudo apt-get --no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev | |
# Install latest patch-level of Ruby 2.0.0 & RubyGems | |
rvm install 2.0.0 | |
# Install Rails | |
# -------------------------------- | |
gem install rails --no-ri --no-rdoc | |
# If zlib errors, do: | |
# rvm pkg install zlib --verify-downloads 1 | |
# then, Reinstall rubies | |
# rvm reinstall all --force | |
# Sanity check | |
rails -v | |
# Run this to integrate Bundler and RVM | |
chmod +x $rvm_path/hooks/after_cd_bundler | |
# Rails Project Prep | |
# -------------------------------- | |
# Uncomment rubyracer gem in Gemfile | |
# Binstubs | |
bundle install -—binstubs && echo "bin/" >> .gitignore | |
# Fancy Vim for Ruby & Rails | |
# -------------------------------- | |
# See https://github.com/carlhuda/janus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment