Other Pages

Expand All

osx_rvm.step

step "Open Terminal" do
  message "Look for **Terminal.app** inside Applications -> Utilities, or use Spotlight search (Command + Space Bar) to find it."

  message "Add it to your dock; you'll be using it a lot. (To add it to the dock, click and hold the dock icon once Terminal is open. Select options -> keep in dock.)"

  tip "Arrange your windows so that Terminal and your web browser are next to each other. You will want to *read* from your browser and *type into* your terminal *at the same time*."
end

step "Install A Compiler (XCode or GCC)" do
  link "install_xcode"
end

step "Install Homebrew" do
  insert "install_homebrew"
end

step "Install Git" do
  message "Next we'll install Git, the most popular version control system in the Ruby world:"

  console "git --version"
  fuzzy_result "git version {FUZZY}2.x.x{/FUZZY}"

  message <<-MARKDOWN
If you see that output, you have Git. <a href='#install-rvm'>Move on to the next step.</a>
  MARKDOWN

  console_with_message "Otherwise, type this in the terminal:", "brew install git"

  verify do
    console "git --version"
    fuzzy_result "git version {FUZZY}2.x.x{/FUZZY}"
  end
end

a name: "install-rvm"
step "Install RVM, the Ruby Version Manager ", {:anchor_name => 'install_rvm_and_ruby'} do
  insert "install_rvm"
end

step "Configure RVM to use Homebrew" do
  console "rvm autolibs homebrew"
end

step "Install Ruby" do
  insert "install_ruby"
end

step "Install Rails" do
  console "gem install rails"
  verify do
    console "rails -v"
    fuzzy_result "Rails 5.{FUZZY}0.x{/FUZZY}"
  end
end

step "Install Atom" do
  insert "install_atom_for_mac"
end

verify "successful installation" do
  console "git --version"
  fuzzy_result "git version {FUZZY}2.x.x{/FUZZY}"

  console "which ruby"
  fuzzy_result "/Users/{FUZZY}alex{/FUZZY}/.rvm/rubies/ruby-{FUZZY}2.0.0-p247{/FUZZY}/bin/ruby"

  console "which rails"
  fuzzy_result "/Users/{FUZZY}alex{/FUZZY}/.rvm/gems/ruby-{FUZZY}2.0.0-p247{/FUZZY}/bin/rails"
end

next_step "configure_git"