Code Monkey home page Code Monkey logo

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

Windows WSL2 Ruby Installation

Install Ruby Environment Manager (RVM) on Ubuntu

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. Installing RVM for Ubuntu is the first step in installing Ruby on your Ubuntu operating system.

Action Item

  1. Open the "Ubuntu" application using the "Start" menu
  2. Type sudo apt-get install software-properties-common and press <Enter>
  3. You may be asked to enter your Ubuntu terminal password
  4. Type sudo apt-add-repository -y ppa:rael-gc/rvm and press <Enter>
  5. Type sudo apt-get update and press <Enter>
  6. Type sudo apt-get install rvm and press <Enter> (Note: if you are asked "Do you want to continue [Y/n]", type "Y" and press <Enter>)
  7. Type sudo usermod -a -G rvm $USER and press <Enter>
  8. Close the "Ubuntu" application
  9. Open the "Ubuntu" application using the "Start" menu
  10. Type rvm and press <Enter>

Check Your Work

<iframe width="560" height="315" src="https://www.youtube.com/embed/tRLexZJS144" 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, consult the troubleshooting steps in the Verify and Troubleshoot your WSL2 Environment Setup lesson later on in this module.

Install Ruby Version 2.7.4 on Ubuntu

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

Action Item

  1. Open the "Ubuntu" application using the "Start" menu
  2. If the "Ubuntu" application is still open from the last step, close and re-open to prevent errors with running the next command.
  3. Type rvm install 2.7.4 --default and press <Enter>
  4. Enter your Ubuntu password if prompted
  5. Type rvm list and press <Enter>

Check Your Work

<iframe width="560" height="315" src="https://www.youtube.com/embed/KYr66fx3nzc" 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.

Note: If you see that Ruby 2.7.4 is installed, but does not display =* before it, close and reopen the "Ubuntu" application, then run rvm use 2.7.4 --default.

Troubleshooting Ruby Installs

If you encounter issues installing a version of Ruby via RVM, try the following in Ubuntu:

  • Run rvm group add rvm $USER
  • Close Ubuntu and reopen
  • Run rvm fix-permissions

After running the last command, try installing Ruby again with rvm install 2.7.4 --default

If you are continuing to have issues installing RVM, try running the following:

$ sudo usermod -a -G rvm $USER

After running, try installing Ruby again.

Install Ruby Gems on Ubuntu

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 your Ruby code when it runs and inspect it.

Action Item

  1. Open the "Ubuntu" application using the "Start" menu
  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 and press <Enter>

Check Your Work

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

If you are able to complete each step without any issues and see pry and bundler listed in the output from running gem list, continue to the next lesson, Configuring Git and GitHub on WSL2.

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

Contributors

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

Stargazers

 avatar  avatar  avatar  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-wsl2-env-ruby's Issues

Ruby on Rails Installation Issues

Canvas Link

https://learning.flatironschool.com/courses/6601/pages/windows-wsl2-ruby-installation?module_item_id=510624

Concern

I've tried at least 20x to install Ruby 2.7.4 using Ubuntu and it continues to say ruby 2.7.4 is not existent. It doesn't show in my "rvm list known" command results.

All I get is, "Error running '__rvm_make -j4' " and, "There has been an error while running make. Halting the installation."

Error Ruby

Additional Context

No response

Suggested Changes

No response

Issue Installing Ruby

Canvas Link

https://learning.flatironschool.com/courses/4605/pages/windows-wsl2-ruby-installation?module_item_id=294938

Concern

image

I was originally having trouble with the section on Forking and completing my first assignment, but I was not able to get past that part. It mentioned on the page that if I am having issues here to go back to the beginning and make sure everything was installed properly. As I was going through the process I got the following error installing Ruby. I hope someone can assist me with this asap! Thank you!

Additional Context

No response

Suggested Changes

No response

sodu

im in the sodu section of my prework and its telling me to put in my terminal ubuntu password and i know what it is, but every time ive tried puttin it in, it tells me that its incorrect, is there any way to retrieve an ubuntu password?

Windows WSL2 Ruby Installation

Canvas Link

https://learning.flatironschool.com/courses/6106/pages/windows-wsl2-ruby-installation?module_item_id=470976

Concern

I kept getting errors using rvm install 2.7.4 --default. I went through the troubleshooting on the page but still could not resolve the problem. I asked the TC and he said to use rvm install 3.1.1 --deafulat command and it worked. So I recommend that README should update the Ruby version.

Additional Context

No response

Suggested Changes

No response

Incorrect ruby version installed

Canvas Link

https://learning.flatironschool.com/courses/4968/pages/windows-wsl2-ruby-installation?module_item_id=321581

Concern

In the section "Install Ruby Version 2.6.1 on Ubuntu", step 3 of the Action Items, version 2.6.1 of RVM is installed. However, later when the validation script is run, the Default RVM item says Ruby should be 2.7.4.

Additional Context

No response

Suggested Changes

I believe the Ruby install instructions should be updated to install 2.7.4 instead of 2.6.1.

Copying "code" tags

Since these instructions require precise keystrokes, in a specific order, and could cause headaches for new students (like me) if they make a typo or don't select the entire command with the cursor, it would be nice if there was a clipboard button at the end of every line with a code tag that copies what's inside the code tag. Also, triple clicking a code tag should override the default "highlight line" command and just highlight what's inside the code tag. That last one just seems way too obvious but I never see it.

Just some thoughts

Unable to install Ruby

I have been attempting to install Ruby in Ubuntu but have not been successful in doing it.

I am using Win 11 via Ubuntu, when running rvm install 2.7.4 it gets up to the compiling when it fails

I get the error:

Error running '__rvm_make -j32',
please read /usr/share/rvm/log/1667417718_ruby-2.7.4/make.log

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

I have attempted to install it on just one core as well, and this also doesn't make a difference. Any help or guidance will be greatly appreciated. Thank you!

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.