curriculum
curriculum copied to clipboard
Convert `nvm` and `rvm` directions to use asdf instead
Description
asdf
is a package manager much like nvm
, but has some very useful features. One of which being the terminal startup time, another being compatible with multiple languages and plugins. It is generally considered nicer to work with as well and has been gaining in popularity. It should also be used to handle Ruby.
Completion Criteria
Convert this file to use asdf to install Node instead of nvm.
Convert this file to use asdf to install Ruby instead of rvm.
I agree; asdf
is simpler to set up too, and I use it on my work machine . I would love to do this. Can I pick this up?
@7ze Sure thing! Please try to get some verification on directions with the supported OSses within reason as well. The Discord chat is a good place to ask for some help. Touch base with me there if you need some help finding people.
It's all yours! Do you have an estimate when you can have this completed?
@7ze While testing I put together some minimum required code snippits, feel free to use these as a template while working on the changes.
Installing asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc
echo ". $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc
NOTE: What about zsh
or macOS users?
Installing nodejs with asdf
sudo apt-get install dirmngr gpg curl gawk
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs lts
asdf global nodejs lts
Installing ruby with asdf
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf install ruby 2.7.4
asdf global ruby 2.7.4
Verifying correct nodejs/Ruby versions are set globally
Run the following command in your terminal:
asdf current
Output should be similar to:
nodejs lts /home/michael/.tool-versions
ruby 2.7.4 /home/michael/.tool-versions
If output looks like this:
nodejs ______ No version is set. Run "asdf <global|shell|local> nodejs <version>"
ruby ______ No version is set. Run "asdf <global|shell|local> ruby <version>"
Run asdf global <nodejs|ruby> <version>
to set the current global version.
nvm warning/error when launching VSCode
Investigate fix for following message if nvm
is installed at the same time:
nvm is not compatible with the npm config "prefix" option: currently set to "/home/michael/.asdf/installs/nodejs/lts/.npm"
Run `npm config delete prefix` or `nvm use --delete-prefix v14.13.1 --silent` to unset it.
@I3uckwheat Thank you, I'll check in with the discord chat for sure. I should be able to complete this in a couple of days for sure.
@xandora Thank you so much for these snippets. Will keep them as a reference while making the changes.
Just to chime in, the Ruby version recommended in the curriculum is now 3.0.x, so users should make sure to install that version over 2.7.x.
As of writing this comment, the current version of Ruby is 3.0.3
sure will add that. Sorry it's taking so long, was sick for a while. I'll update this asap.
@7ze
In case you don't know,
The node installation lesson mentioned above is now archived: https://github.com/TheOdinProject/curriculum/blob/main/foundations/installations/installing_node.md (you will get 404) https://github.com/TheOdinProject/curriculum/blob/main/archive/installing_node.md (it's moved to archives) So you don't need to update the above one. Instead you need to update the one below,
We now have a separate lesson for installing node.js here: https://github.com/TheOdinProject/curriculum/blob/main/foundations/javascript_basics/installing_nodejs.md
@Maheshkumar-novice sure, updating it
@7ze Just wanted to check on the status of this issue 🙂
Hi, Any updates on this issue?
Hi, Any updates on this issue?
@Maheshkumar-novice I think we can probably consider this one abandoned. I'm going to unassign this. Are you interested in working on it? If not, I'll pick it up myself.
@xandora You can pick it, I'm not interested.
This issue is stale because it has had no activity for the last 30 days.
LIES. I am dealing with it. I promise.
Is this still active/required? I just made the switch from nvm/rbenv today to asdf so it's fresh on my mind.
@crespire I have most of the lessons converted, I just did the work on my mac, and I don't use that very often. I will try and get to figuring out the status over the weekend.
@crespire I have most of the lessons converted, I just did the work on my mac, and I don't use that very often. I will try and get to figuring out the status over the weekend.
If there are any you want to offload on the Linux side, let me know! Happy to help on that side.
This issue is stale because it has had no activity for the last 30 days.
@xandora how we doing on this?
No rush or anything.. I'm just following up on some of our stale issues
I'm somewhere between half and done. Do we still want it?
This issue is stale because it has had no activity for the last 30 days.
@xandora
I think it makes sense to switch to an in all one solution still. Are you happy to finish it off?
@CouchofTomato yup. I'll try and get it done over the next couple weeks.
This issue is stale because it has had no activity for the last 30 days.
I'm trying out ASDF on macOS 14.0 now, and would be happy to update these Ruby Install instructions based on documentation & any issues/caveats I run into.
(I could also update the Linux instructions based on documentation, but don't currently have a testing environment for that.)
@xandora
Are you happy for help as per comment above?
I'm also able to help and have both linux and macOS at my disposal now.
For what it's worth, the following two pages of instructions from Daniel Kehoe (for installing on macOS: asdf then Ruby) are simpler than asdf documentation & worked smoothly for me (macOS 14.0, Ruby 3.2.2).
https://mac.install.guide/ruby/5.html https://mac.install.guide/ruby/6.html
My only change would be, after brew install asdf
, to verify installation & list dependencies with the single command brew deps --tree --installed asdf
.
This issue is stale because it has had no activity for the last 30 days.