Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Ruby: Outdated outcome messages of rbenv init #28436

Closed
3 tasks done
hebiscus opened this issue Jul 17, 2024 · 9 comments · Fixed by #28614
Closed
3 tasks done

Installing Ruby: Outdated outcome messages of rbenv init #28436

hebiscus opened this issue Jul 17, 2024 · 9 comments · Fixed by #28614
Assignees

Comments

@hebiscus
Copy link
Contributor

Checks

Describe your suggestion

Rbenv got an update 2 months ago and message after running rbenv init has changed. In the lesson at #step-22-install-rbenv two outcome messages are now incorrect, which puzzles people.

I think instead of relying on the content of an outcome message, verifying if rbenv got installed correctly with rbenv -v would be better.

Specific commit with those changes in rbenv repo: rbenv/rbenv@c3ba994

Path

Ruby / Rails

Lesson Url

https://www.theodinproject.com/lessons/ruby-installing-ruby

(Optional) Discord Name

hebiscus.

(Optional) Additional Comments

No response

@JoshDevHub
Copy link
Contributor

JoshDevHub commented Jul 19, 2024

Hi thank you for making this issue @hebiscus !

We really just need to straight up change how the curriculum does this. Hopefully you're still up for making that PR!

The rbenv init script now automatically writes the necessary PATH updates to the user's shell profile. This means that after cloning the rbenv repository, users can just run ~/.rbenv/bin/rbenv init in their terminal and everything will automatically be set up from there. There's no longer any need to run any of those echo "eval blahblahblah" commands.

The user does still need to install ruby-build, so don't touch those instructions. Also make sure to update this for both the Linux and MacOS branches of the install instructions.

Since you indicated you'd be okay with working on this, I'll assign you. Definitely let me know if you have any questions or any of the things I'm requesting are unclear to you. I'm very glad to help or explain more!

@JoshDevHub
Copy link
Contributor

Any update on this @hebiscus ?

@hebiscus
Copy link
Contributor Author

hebiscus commented Aug 8, 2024

@JoshDevHub Will be taking care of this in the upcoming days, Sunday the latest

@beneficial-radish
Copy link
Contributor

Hi. I had this issue as well, found the solution in the README, and was encouraged to contribute the solution. I was about to submit my pull request, but I guess since it's already been assigned, it will simply be cancelled without review if I try to submit it. This is my first time trying to contribute, so I guess it's good learning this lesson on something that was only two lines!

@beneficial-radish
Copy link
Contributor

Oh! Hold up. It looks like this issue was closed without the instructions being modified? The init command is still the same.; doesn't match ~/.rbenv/bin/rbenv init

@Eduardo06sp
Copy link
Member

@CouchofTomato I just tried following the exact steps for installing Ruby on Linux (https://www.theodinproject.com/lessons/ruby-installing-ruby).

Indeed, I ran into the issue multiple people said they ran into.

I had to run

~/.rbenv/bin/rbenv init

then right after that,
reset my terminal.

I know I'm kind of repeating some of the same thing,
but I wanted to assure you that with these changes,
it worked on a VM I fired up running a freshly installed Ubuntu 24.04 LTS.

I have no idea if the MacOS instructions need to be updated. I can test it on a Macbook if you need me to.

@beneficial-radish
Copy link
Contributor

@CouchofTomato I just tried following the exact steps for installing Ruby on Linux (https://www.theodinproject.com/lessons/ruby-installing-ruby).

Indeed, I ran into the issue multiple people said they ran into.

I had to run

~/.rbenv/bin/rbenv init

then right after that, reset my terminal.

I know I'm kind of repeating some of the same thing, but I wanted to assure you that with these changes, it worked on a VM I fired up running a freshly installed Ubuntu 24.04 LTS.

I have no idea if the MacOS instructions need to be updated. I can test it on a Macbook if you need me to.

It looks like the mac instructions may have changed as well.

@CouchofTomato I just tried following the exact steps for installing Ruby on Linux (https://www.theodinproject.com/lessons/ruby-installing-ruby).

Indeed, I ran into the issue multiple people said they ran into.

I had to run

~/.rbenv/bin/rbenv init

then right after that, reset my terminal.

I know I'm kind of repeating some of the same thing, but I wanted to assure you that with these changes, it worked on a VM I fired up running a freshly installed Ubuntu 24.04 LTS.

I have no idea if the MacOS instructions need to be updated. I can test it on a Macbook if you need me to.

I tagged you in the discord before thinking about linking this message here. I don't have a MacBook available to me, but I ran a search in the Ruby Help channel and found this from 7/29. Seems like it might be related to the recent update as well, but I can't be sure without seeing what they were looking at.
https://discordapp.com/channels/505093832157691914/543074220691947531/1267441895382978631

@Eduardo06sp
Copy link
Member

Eduardo06sp commented Aug 13, 2024

@beneficial-radish the solution for that user's issue was to add Homebrew to their PATH variable I believe.

the Installing Ruby lesson (for MacOS) reads:

If it outputs a certain path, you’re good to go ahead! But if the terminal reads brew not found, please go through the MacOS instructions in the setting up git lesson to get homebrew installed.

Once you go through that, there should be a message that tells you how to add Homebrew to your PATH, which, again, seems to solve this issue.

Additionally, there is a note on the Setting up Git lesson that reads:

⚠️ On an Apple Silicon Mac, you will have an extra step to take. If you look at the terminal output after installing Homebrew, you will see “Installation Successful!”. Further down in the terminal, there will be a section called “Next steps”. Reading the terminal may seem a bit intimidating, but this is a great chance to overcome those feelings. Follow the next steps as stated in your terminal (copy and paste the commands given) to add Homebrew to your PATH, which allows you to use the brew command prefix.

It is unclear to me if this is something that will happen every time, or only to certain users.

@beneficial-radish
Copy link
Contributor

Gotcha. I haven't messed with MacOS on that level, so I wasn't sure if it was related to the new way that rbenv behaves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants