I am reinstalling my environment after reinstalling windows 10. I was given instructions for installing WSL2 and using the Ubuntu distro, nvm and then node.js, and then rvm and ruby. My organization wants us on ruby version 2.7.4 specifically. I am sure that if I posted the full instructions that wouldn't be allowed, but I am going to post the code they tell us to run to see if anyone knows why I get this error. I have gotten it to work on this machine before, and these steps are repeatable on other windows machines because I setup an environment on my laptop.
Here are the steps I was told to follow:
1. Install Windows Subsystem for Linux (WSL) and Ubuntu • Search for the "Command Prompt" application using the "Start" menu • Select "Run as administrator" from the right side of the search window • Allow the program to make changes to your device and wait for the "Command Prompt" application to open • Type wsl --install -d Ubuntu and press • The terminal should output "The requested operation is successful." • Restart your computer to complete the installation. • Open the "Ubuntu" application • When it says "Enter new UNIX username:" add a simple username and press (Note: usernames may not start with a number, and may not include capital letters) • Where it says "New password:" add a simple password and press (Note: you will not see any text when you are typing your password.) • Where it says "Retype new password:" retype the same password from before and press (Note: store this password somewhere safe. You will need it to be able to run commands in the future) • The terminal should output "Installation successful!" and then print about 50 lines that you can ignore • Type wsl --set-default-version 2 into the terminal and press (Note: you should see a message starting with "For information on key differences…") • Type wsl --status into the terminal and press . You should see a message including "Default Version 2", which verifies that the default version has been set correctly. • Type wsl --set-version Ubuntu 2 into the terminal and press Wait for the "Conversion complete" or "This distribution is already the requested version" message in the terminal • Type wsl --list --verbose into the terminal and press . You should see a message including "NAME Ubuntu VERSION 2", which verifies that the default version has been set correctly. 2. Install Node Version Manager (NVM) on Ubuntu • Open the "Ubuntu" application using the "Start" menu • Type curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash and press • Close the "Ubuntu" application • Reopen the "Ubuntu" application • Type nvm and press • If you see a message ending with "Note: to remove, delete, or uninstall nvm", continue below. 3. Install Node.js on Ubuntu • Open the "Ubuntu" application using the "Start" menu • Type nvm install --lts and press • Type nvm list and press • If you see a message starting with "-> v16.0.0" (or any higher number, like "-> 16.11.1"), continue to the next lesson 4. Install Ruby Environment Manager (RVM) on Ubuntu • Open the "Ubuntu" application using the "Start" menu • Type sudo apt-get install software-properties-common and press You may be asked to enter your Ubuntu terminal password • Type sudo apt-add-repository -y ppa:rael-gc/rvm and press • Type sudo apt-get update and press • Type sudo apt-get install rvm and press (Note: if you are asked "Do you want to continue [Y/n]", type "Y" and press ) • Type sudo usermod -a -G rvm $USER and press • Close the "Ubuntu" application • Open the "Ubuntu" application using the "Start" menu • Type rvm and press • If you see a long message ending in "For additional documentation, please visit https://rvm.io This is an external link.", continue below 5. Install Ruby Version 2.7.4 on Ubuntu (This is the part I can't get to work) • Open the "Ubuntu" application using the "Start" menu • If the "Ubuntu" application is still open from the last step, close and re-open to prevent errors with running the next command. • Type rvm install 2.7.4 --default and press • Enter your Ubuntu password if prompted • Type rvm list and press • If you see a message starting with =* ruby-2.7.4, continue below • 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.
The install seems to fail when compiling and I get this error message:
"Error running '__rvm_make -j16', please read /home/dylan9706/.rvm/log/1671650995_ruby-2.7.4/make.log
There has been an error while running make. Halting the installation."
Any help would be appreciated. Thanks!
I asked a friend and they had the same issue. They sent me some links and told me to try it. Follow these steps.
This is the solution that worked for me so I hope this helps!