Code Monkey home page Code Monkey logo

phase-0-macos-env-ruby's Introduction

Installing Ruby on MacOS

Install the GMP and GnuPG Packages

Before installing RVM and Ruby, we will need to add two tools which help us to verify that we're installing the software that we're expecting.

Action Item

  1. Open the "Terminal" application using "Spotlight Search"
  2. Type brew install gmp and press <Enter>
  3. Type brew install gnupg and press <Enter>

Check Your Work

<iframe width="560" height="315" src="https://www.youtube.com/embed/5JTWcR7n1xo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

If you get an error saying "command not found: brew", Homebrew may not be installed or failed to install correctly. Please go back through the "MacOS System Setup" lesson first before going through the rest of this one.

If you get an error saying "Warning: gnupg-1.4.19 already installed", GnuPG is installed, but it may not be linked properly. To fix:

  1. Open the "Terminal" application using "Spotlight Search"
  2. Type brew link gnupg and press <Enter>

Install Ruby Environment Manager (RVM) on macOS

Ruby Environment Manager (RVM) is a tool that will allow you to download and install multiple versions of Ruby, one of the programming languages that we teach at Flatiron School. This is the first step in installing Ruby on your macOS operating system.

Action Item

  1. Open the "Terminal" application using "Spotlight Search"
  2. Type gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB and press <Enter>
  3. Type \curl -sSL https://get.rvm.io | bash -s stable and press <Enter>
  4. Close and reopen the "Terminal" application
  5. Type rvm and press <Enter>

Check Your Work

<iframe width="560" height="315" src="https://www.youtube.com/embed/KLPVQDUYu-I" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

If you see a long message ending in "For additional documentation please visit https://rvm.io", continue below.

If rvm is not found, check out the troubleshooting steps in the Verify and Troubleshoot your macOS Environment Setup lesson later on in this module.

Install Ruby version 2.7.4 on macOS

For our Ruby labs and lessons, we expect that students use Ruby version 2.7.4. If Ruby Environment Manager (RVM) has been successfully installed, you can quickly install Ruby with a couple of commands.

Action Item

  1. Open the "Terminal" application using "Spotlight Search"
  2. Type rvm install 2.7.4 --default and press <Enter>
  3. Type rvm list and press <Enter>

Check Your Work

<iframe width="560" height="315" src="https://www.youtube.com/embed/cKU3o2xqqtU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

If you see a message starting with "=* ruby-2.7.4", continue below.

Install Ruby Gems

Ruby Gems are small programs written in Ruby that help you to code more easily in Ruby. The gems you will install today include: Bundler, which allows you to keep track of which gems your projects need to work, and Pry, which allows you to pause Ruby code execution when it runs and inspect it.

Action Item

  1. Open the "Terminal" application using "Spotlight Search"
  2. Type gem update --system and press <Enter>
  3. Type gem install bundler and press <Enter>
  4. Type gem install pry and press <Enter>
  5. Type gem list | wc -l and press <Enter>

Check Your Work

<iframe width="560" height="315" src="https://www.youtube.com/embed/rc5vn4FVvXc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

If you can complete each step without any issues and you see an output of a number around or above 60 from the last command, continue to the next lesson, Configuring Git and GitHub on macOS.

phase-0-macos-env-ruby's People

Contributors

maxwellbenton avatar lizbur10 avatar ihollander avatar bal360 avatar jlboba avatar timothylevi avatar timothylevi-test avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.