Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.96 KB

00_ruby-rvm-installation.md

File metadata and controls

39 lines (26 loc) · 1.96 KB

Ruby / RVM Installation

Development Tools

Start by installing the following software. Each of these are easy one-click installers:

Install Command Line Tools (CLI)

We'll need to install the Command Line Tools from Xcode.

  • Open Xcode
  • Go to Xcode > Preferences in the menu bar. Protip™: On a Mac, ⌘, (command+comma) is a shortcut for the preferences in most applications
  • Click on the Downloads tab.
  • Locate Command Line Tools in the list of Components, and click install.

Install RVM

RVM (Ruby Version Manager) is a system to isolate and install multiple versions of ruby on the same computer. Programming languages evolve quickly, and so do the libraries written in Ruby, and every version will introduce change. One project may be dependent on Ruby 1.9.3 while another may be dependent on the features in Ruby 2.0.0. To avoid conflicts with different versions of ruby and libraries RVM isolates the installations related to each version.

  • Open the Terminal app.
  • Type \curl -L https://get.rvm.io | bash You will see a bunch of output
  • Open the file located at ~/.bash_profile and add source $HOME/.rvm/scripts/rvm to the bottom of the file. Protip™: You can use the echo command in the terminal to append text to a file without opening it. echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
  • To ensure RVM is installed correctly type type rvm | head -n 1, if everything is right it should return rvm is a function.

Install Ruby 2.0.0

Use the rvm tool to install and use Ruby 2.0.0.

  • rvm install ruby-2.0.0
  • Wait a while... It will take a few minutes
  • rvm use 2.0.0
  • Check the version with ruby -v. This should read ruby 2.0.0...
  • Next open up IRB and give 'er a try. irb 1 + 1

TODO: RVM Lesson