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

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

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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

Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!....So Lost!

Thanks for raising this issue! Future learners thank you for your diligence. In
order to help the curriculum team address the problem, please use this template
to submit your feedback. We'll work on addressing the issue as soon as we can.

Please fill out as much of the information below as you can (it's ok if you
don't fill out every section). The more context we have, the easier it will be
to fix your issue!

Note: you should only raise issues related to the contents of this lesson.
If you have questions about your code or need help troubleshooting, reach out to
an instructor/your peers.


Link to Canvas

https://learning.flatironschool.com/courses/4327/pages/installing-ruby-on-macos?module_item_id=251501

Describe the bug

Was suppose to run $ 'rvm install 2.7.4 --default' and it keeps giving me an error, I've tried troubleshooting and I can not get an answer. I get an error following that command that says 'Searching for binary rubies, this might take some time.
No binary rubies available for: osx/11.5/x86_64/ruby-2.7.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
arch -arm64 brew install ...
To install under x86_64, install Homebrew into /usr/local.
Requirements installation failed with status: 1.'

What is the expected behavior?

I was to run 'rvm list' and then get a message starting with "=* ruby-2.7.4"

Screenshots

Screenshot 2021-07-25 at 3 07 53 PM

What OS are you using?

  • OS X (Macbook Air 2020 M1 chip)
  • WSL
  • Linux

Any additional context?

Spent many hours on this. I went ahead cause it says I have ruby 3.0.0 and thought I could get away with it. The first CSS assignment won't let me bundle cause it says I need ruby 2.0

Issue installing Ruby 2.6.1 MacOS

In my terminal I am running into an Error on the install.

Error running '__rvm_make -j16',
please read /Users/mathawudnopprapun/.rvm/log/1615336176_ruby-2.6.1/make.log

There has been an error while running make. Halting the installation.

If I put in 'rvm list' I get, No rvm rubies installed yet. try 'rvm help install'

cannot install rvm 2.6.1

Error message: Error running '__rvm_make -j8',
please read /Users/samjomaiv/.rvm/log/1616194862_ruby-2.6.1/make.log

There has been an error while running make. Halting the installation.

I tried to google but nothing helps.

having an error installing "gmp" and "gnuPG" packages

% brew install gmp
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "gmp".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

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.