TheOdinProject / curriculum

The open curriculum for learning web development

Home Page:https://www.theodinproject.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing Rails: Update Instructions for Installing Yarn on Ubuntu

nicholschm opened this issue · comments

Checks

Describe your suggestion

The lesson for installing Rails contains a section dedicated to installing Yarn. This section provides a link to the Yarn Download page, and recommends to users that it should be installed through npm. I had issues on Ubuntu when setting up a local clone of the Web App Repo at this step. After progressing through the Running The Odin Project Locally guide I noticed there was a note with a link for Ubuntu users to install Yarn Linuxize. This link is also outdated, there is an article with updated instructions for newer versions of Ubuntu Updated Link from the same source.

I am proposing updating the Installing Rails lesson to include the contents of the note found in the Running The Odin Project Locally guide, and updating the link to account for newer versions of Ubuntu. I would gladly submit a Pull Request with those changes if assigned.

Path

Ruby / Rails

Lesson Url

https://www.theodinproject.com/lessons/ruby-on-rails-installing-rails#step-12-install-yarn

(Optional) Discord Name

No response

(Optional) Additional Comments

No response

@nicholschm Thank you for making this issue.

I'm wondering a bit more about your specific issues with installing yarn via npm? What was the exact problem with doing this? Did you have issues getting npm itself installed?

Hello Josh,

Regrettably I did not screenshot the exact error message I received at the time, however I did take notes regarding any errors I encountered in the installation processes. There seemed to be a conflict with cmdtest and Yarn, which required using $ sudo apt remove cmdtest prior to installing yarn. I searched through the RTOPL guide and came across the included note for Ubuntu users further on, and was able to utilize the directions from the included link to straighten the issue out.

As another test, I just installed a fresh copy of Ubuntu to attempt to recreate the errors, and attempted to install Yarn via npm. The install worked with some minor adjustments:

  1. npm not installed, installed using $ sudo apt install npm
    Screenshot from 2024-05-21 15-53-44

  2. File access issue when running $ npm install --global yarn
    Screenshot from 2024-05-21 15-56-01

  3. Issue can be corrected using sudo to install
    Screenshot from 2024-05-21 15-57-33

I did not encounter the same conflict with cmdtest on this iteration, so unfortunately I could not recreate it for you. I would still propose including the note specifically related to installing Yarn on Ubuntu, which avoids utilizing npm and installs directly from the Yarn repository without any adjustments or additional installations required, however that would be entirely at your discretion.

Thank you for responding, I am a CS student looking to contribute in any way I can to improving the project.

Ah okay. I would definitely not install npm through apt. This is likely the result of any problems you've had while setting this up.

A better way would be to install a version manager for NodeJS. The TOP curriculum walks through installing nvm (or node version manager) in this foundations course lesson. By the time a learner makes it to the Rails course, it's assumed they will have already done that and therefore isn't mentioned anywhere.

To me, the best way forward on this would be to change the main site's wiki to reference the lesson for installing Node in the event that someone is setting up TOP locally without having done that installation.

Unfortunately I believe the wiki is read-only for contributors, so that change will have to be handled on our end.

Thank you for responding, I am a CS student looking to contribute in any way I can to improving the project.

That's awesome! Glad to have new contributors.

@JoshDevHub https://discord.com/channels/505093832157691914/505093832157691916/1242804726303686676 Regarding the lesson's intention to install Yarn Classic, is the team aware of/planning anything regarding Classic's EOL as per https://classic.yarnpkg.com/en/docs/install#windows-stable?

@MaoShizhong I don't think there are any plans, and I'm not even sure yarn classic has a concrete EOL date?

The TOP main site is still using classic, so I figure we'll update the curriculum instructions to modern whenever that gets changed.

Ah okay. I would definitely not install npm through apt. This is likely the result of any problems you've had while setting this up.

A better way would be to install a version manager for NodeJS. The TOP curriculum walks through installing nvm (or node version manager) in this foundations course lesson. By the time a learner makes it to the Rails course, it's assumed they will have already done that and therefore isn't mentioned anywhere.

To me, the best way forward on this would be to change the main site's wiki to reference the lesson for installing Node in the event that someone is setting up TOP locally without having done that installation.

Unfortunately I believe the wiki is read-only for contributors, so that change will have to be handled on our end.

@JoshDevHub I understand, and I agree with you that referencing a Node installation would help resolve that issue. I have not completed the curriculum yet, I went directly to the Contributing Guides looking to get the web app running locally and seeing if there were any gaps in the directions I could help improve as a new user. I am new to Ubuntu as well, so I thought this would be a good usability test as someone without prior experience with the project.

Also, I noticed this option when browsing the Wiki page:
image

When clicking Open an issue I am redirected to submitting an issue for the Web App repo. I intended to open a separate issue for something minor on a Wiki page, so if that is the preferred method for submitting issues related to the Wiki I will go through theodinproject repo's issue submission.

Thank you again for your help and guidance!

I've updated the wiki to make sure people have installed node before proceeding with the yarn installation stuff. I'll be closing this issue as completed. Thanks for alerting us to this problem.

When clicking Open an issue I am redirected to submitting an issue for the Web App repo. I intended to open a separate issue for something minor on a Wiki page, so if that is the preferred method for submitting issues related to the Wiki I will go through theodinproject repo's issue submission.

Yeah if you noticed a different problem with the wiki, you can absolutely raise an issue on the web app repo.