Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Fest!

Ruby on Rails Development Setup

#Install Git and Ruby

##Mac Users

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

  1. Install Command Line Tools

    • We need to install some command-line tools for OSX, to do this, simply copy and paste this command into your Terminal application: xcode-select --install
    • Install the command line tools utilities as instructed.
  2. 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://mxcl.github.io/homebrew/
    • To learn more about Hombrew, check out its homepage: 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.
  3. 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 it's install Git:
      • brew install git
  4. Configure Git with your Name and Email

  5. Install RVM with Ruby 2.1.2

    • OSX comes with Ruby 1.8.7 (or later) out of the box. However, for this class we want to use Ruby 2.1.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.1.2, and then set it as the default Ruby.
    • To install Ruby 2.1.2 with RVM, run this command:
      • \curl -L https://get.rvm.io | bash -s stable --ruby=2.1.2
    • Restart your terminal
    • Now set Ruby 2.1.2 as your default Ruby build:
      • rvm use 2.1.2 --default
  6. 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).
  7. 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.22.2 or higher)
      • For Ruby: ruby -v (you should get ruby 2.1.2p95 or higher)
  8. Install Rails

    gem install rails --no-ri --no-rdoc

  9. 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 -L https://get.rvm.io | bash -s stable --ruby=2.1.2
  • The backslash in font of "curl" is not a typo.
  • Close and reopen terminal
  • rvm use 2.1.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.0.0 or higher.
      • For Ruby

        • ruby -v You should get ruby 2.1.2p95 or higher.

##Windows Users

  1. Install Ruby on Rails
  1. Windows 8: Install Node.js

##Happy Coding :)

You're ready to go!

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