Skip to content

Instantly share code, notes, and snippets.

@bill-transue
Created October 27, 2015 23:34
Show Gist options
  • Save bill-transue/e231311fe10fe3d5d48a to your computer and use it in GitHub Desktop.
Save bill-transue/e231311fe10fe3d5d48a to your computer and use it in GitHub Desktop.

BACK-END WEB DEVELOPMENT

GeneralAssemb.ly

Install Git, Ruby, and Heroku

Mac Users

Commands that look like this should be entered into your Terminal application. It can be found in Applications/Utilities.

In general we recommended running the latest version of OS X, which is 10.10, known as Mavericks.

  1. Ensure you have an Apple ID
  1. Install Command Line Tools
  • We need to install Xcode 6.4 to provide a compiler. Xcode can be found in the Apple's AppStore, or downloaded for free here.
  • Once Xcode is installed, you will need to install the Command Line Tools for Xcode. You can install it by running xcode-select --install from the command line or download them directly here.
  1. Install Homebrew
  • Homebrew is a package management library, which basically means it's an OSX app that lets us install other libraries and tools we need.
  • To install it, simply copy and paste this command into your Terminal application: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • If you have issues, visit the Homebrew install page: http://brew.sh/
  • NOTE: For advanced users only: If you have a strong desire to use a different package management tool (such as MacPorts, or Fink), you may do so, but note that we may not be able to support you if you encounter any issues with your specific tool. Proceed with caution.
  1. Install git
  • In order to manage our code effectively, we need a source control management tool. There are a number of options out there, but Git is by far the best one today.
  • We will use Homebrew to install Git. Before we do so, let's update homebrew to get the latest 'recipes' for its available libraries:
    • brew update
  • Now lets install Git:
    • brew install git
  • Verify that it's been installed correctly by running which git and it should return /usr/local/bin/git. If it doesn't let one of the instructors know.
  1. Configure Git with your Name and Email
  1. Install RVM with Ruby 2.2.2
  • OSX comes with Ruby 2.0.0 out of the box. However, for this class we want to use Ruby 2.2.2.
  • RVM is a simple tool that lets you manage which Ruby builds are installed on your machine (you can have multiple ones at the same time!)
  • We will use RVM to install Ruby 2.2.2, and then set it as the default Ruby.
  • To install Ruby 2.2.2 with RVM, run this command:
    • \curl -sSL https://get.rvm.io | bash -s stable --ruby
  • Now set Ruby 2.2.2 as your default Ruby build:
    • rvm use 2.2.2 --default
    • OPTIONAL: You may also remove Ruby 1.8.7, if you wish:
      • rvm remove ruby-1.8.7
  1. Install Heroku Toolbelt
  • In order to delpoy our rails apps for others to use we'll need heroku
  • We will use Homebrew to install Heroku Tollbelt. Before we do so, let's update homebrew to get the latest 'recipes' for its available libraries:
    • brew update
  • Now lets install Heroku Toolbelt:
    • brew install heroku-toolbelt
    • Verify that it's been installed correctly by running which heroku and it should return /usr/local/bin/heroku. If it doesn't let one of the instructors know.
  1. Restart Your Terminal
  • To ensure all the changes you made so far take effect, restart your Terminal app (just quit the app and relaunch it).
  1. Make sure the latest versions of RVM and Ruby were installed
  • To verify that you have the latest RVM and Ruby, run the commands below:
    • For RVM: rvm -v (you should get rvm 1.26.11 or higher)
    • For Ruby: ruby -v (you should get ruby 2.2.2 or higher)
    • For Heroku: heroku version (yoush should get heroku-toolbelt 3.42.20 or higher)
  1. Congrats! You're all set. Now go build something awesome :)

Ubuntu Linux Users

Commands that look like this should be entered into your Terminal application.

  1. Open a terminal window
  1. Install git
  1. Install curl
  • sudo apt-get install curl
  1. Install RVM
  • \curl -sSL https://get.rvm.io | bash -s stable --ruby
  • The backslash in font of "curl" is not a typo.
  • Close and reopen terminal
  • rvm use 2.2.2 --default
  • Make sure the latest versions of RVM and Ruby were installed, run the commands below:
    • For RVM

      • rvm -v You should get rvm 1.26.11 or higher.
    • For Ruby

    • ruby -v You should get ruby 2.2.2 or higher.

  1. Install Heroku Toolbelt
  • wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
  • Close and reopen the terminal
  • heroku version
  • Make sure you get 3.42.20 or higher

Windows Users

  1. Install VirtualBox
  1. Download Ubuntu Linux
  1. Create your virtual machine
  • Open VirtualBox and click the "New" button
  • Enter any name
  • Select "Linux" as the type
  • Select either "Ubuntu" or "Ubuntu (64 bit)" as the version depending on which you downloaded.
  • Memory size is the amount of your RAM that will be used to run Linux. 1024MB should be more than enough, but if you have a lot of RAM you can boost this number. If your machine only has 1GB of RAM then 512MB will have to do. If you're not sure, don't worry because this value can be changed later.
  • Hard drive - Select "Create a virtual hard drive now" then use the "VDI" type and then the "Dynamically allocated" option. Name the virtual hard drive file anything and select an amount of hard drive space that your computer is capable of supporting. 8GB should be plenty.
  • After clicking "Create", select the new virtual machine you created in the left column and press the "Start" button.
  • In the "Select start-up disk" window, select the Ubuntu Linux .iso file you downloaded and press start. You can then follow the Ubuntu installation instructions.
  1. Setup Ubuntu
  • Open the Devices menu, then click 'Insert Guest Additions CD image...'
  • You should a pop up asking if you want to start the auto run process, click Yes. You'll be prompted for your user password.
  • After the script completes restart your VM.

Happy Coding :)

You're ready for the first class.

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