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

Ruby: Update recommended Ruby version to 3.1 #24112

Closed
2 of 6 tasks
ChargrilledChook opened this issue May 8, 2022 · 14 comments
Closed
2 of 6 tasks

Ruby: Update recommended Ruby version to 3.1 #24112

ChargrilledChook opened this issue May 8, 2022 · 14 comments
Assignees
Labels
Type: Ruby/Rails Involves the full stack Ruby on Rails path

Comments

@ChargrilledChook
Copy link
Member

ChargrilledChook commented May 8, 2022

Complete the following REQUIRED checkboxes:

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this issue follows the location for request: brief description of request format, e.g. NodeJS course: Add lessons on XYZ

The following checkbox is OPTIONAL:

  • I would like to be assigned this issue to work on it

I'm happy to but it may be a good one for a less experienced contributor. I also need to finish a different issue first.


1. Description of the Feature Request:

Ruby 2.6 has recently hit EOL, and Ruby 3.2 has a preview branch - we're at a point in the patch cycle where 3.1 is reasonably stable and should be safe to upgrade to.

On top of that, there are issues with pre 3.1 versions of Ruby on Ubuntu 22.04 due to incompatibilities with openssl v3. Updating the recommended Ruby version could help get in front of this a little as people begin to move to the new LTS Ubuntu version.

2. Acceptance Criteria:

  • The installation lesson is updated to Ruby 3.1
  • Exercise repositories are also updated (ie .ruby-version files)
  • Any other references throughout the curriculum are updated as needed

3. Additional Information:

Probably worthwhile looking at previous PRs to upgrade the version to check places where things need to be updated

@scheals
Copy link
Contributor

scheals commented May 8, 2022

The Ubuntu 22.04 issues Chook mentions have already started to crop up. Possible fixes are here:
https://deanpcmad.com/2022/installing-older-ruby-versions-on-ubuntu-22-04/
rbenv/ruby-build#1940 (comment)

They are even known by the rbenv maintainers (as linked above) and Ruby maintainers:
https://bugs.ruby-lang.org/issues/18658

It's all pretty fresh mind you, so maybe those people are going to figure something out. As it currently stands, I have managed to install Ruby 3.1.2 on a 20.04 Xubuntu and failed to install 3.0.3 on Ubuntu 22.04 with the same error message everyone posts.
I can test those workarounds linked if y'all want to go with that route.

@wise-king-sullyman
Copy link
Member

@ChargrilledChook @scheals before I put the help wanted and good first issue tags on this, are either of you wanting to knock this issue out?

@ChargrilledChook
Copy link
Member Author

ChargrilledChook commented May 21, 2022

@wise-king-sullyman my bandwidth is fairly low at the moment and I think it's a good one for a beginner, so I'm happy to pass for now. If no one has picked it up in week or so I can come back to it.

Either as part of this issue or in a separate one, it would be good to update the Ruby version in the Ruby exercise and testing repos (maybe custom enumerables too?)

@scheals
Copy link
Contributor

scheals commented May 21, 2022

Looked into how rbenv discussion is looking like rbenv/ruby-build#1974 it seems that they've begun work on some kind of a solution recently but aren't really happy with it and for now rbenv is only supporting 3.1+ for 22.04.

@wise-king-sullyman Yeah, I'll gladly work on this but I might need help if problems occur.

@ChargrilledChook Given that the idea would be to update the various repos and such would we want to update various gems in them too?
Because of #23552 I could swap the instructions for installing the gem there as well on my way there. Of course I'd test everything on fresh 20.04 and 22.04 Xubuntu VMs to make sure everything works.

@wise-king-sullyman
Copy link
Member

@scheals since you're interested in it and this issue seems to be kind of growing in scope to include a decent amount of investigation I think I'd rather see you work on this than bring a new contributor in. If you do run into problems please don't hesitate to reach out.

And thanks for wanting to do this!

@ChargrilledChook
Copy link
Member Author

ChargrilledChook commented May 22, 2022

@wise-king-sullyman sounds good.

@scheals I'm happy to assist if you want any input / a second pair of eyes. Feel free to reach out if you need 👍

re: gems, sounds like a good idea but it may make more sense to do them in their own issues given they're all in separate repos

@scheals
Copy link
Contributor

scheals commented May 22, 2022

@ChargrilledChook Thank you!

Yeah, was rather absent-minded when it came to the gems and the fact it is different repos. Still, I'll be going through it so I'll try my best to touch on that as well.

@scheals
Copy link
Contributor

scheals commented May 22, 2022

I found the past issue about upgrading to 3.0 #23434 stashing it here for continuity's sake.

@ChargrilledChook
Copy link
Member Author

@scheals The three exercise updates look good at a glance, have you given them a quick test drive with Ruby 3.1 to make sure nothing blows up? ( I doubt there would be any major issues, but you never know).

Once the changes in the curriculum PR are made we should be good to wrap this up.

Thanks again for all your work on these 🎉

@scheals
Copy link
Contributor

scheals commented Jun 7, 2022

@scheals The three exercise updates look good at a glance, have you given them a quick test drive with Ruby 3.1 to make sure nothing blows up? ( I doubt there would be any major issues, but you never know).

Once the changes in the curriculum PR are made we should be good to wrap this up.

Thanks again for all your work on these tada

I haven't written any code that would pass the tests but I ran some of the tests - there was an issue about I believe old bundler version complaining about some call being deprecated when running tests but this got fixed after updating it. I'll grab someone's repos because I haven't pushed any of mine besides custom_enumerables, update it the same way & run the code to see if it blows up on my current 3.1.2 Xubuntu 20.04 dual boot setup. Versions I tested were Ubuntu & Xubuntu 20.04/22.04 and 3.1.2 seems to work fine on those.

I have ran the Event Manager snippets with the deprecated gem used in the lesson & with the up-to-date gem without any issues as well.

Sadly, all my notes about the process are unavailable to me due to having them locally stored on my PC that's still in the repair shop - and I might even not get them back. I believe some sort of update to the Pattern Matching lesson might be in order because from what I've gathered some form of Rightward Assignment is no longer experimental but only one of couple, whatever that means.

@ChargrilledChook
Copy link
Member Author

I believe some sort of update to the Pattern Matching lesson might be in order because from what I've gathered some form of Rightward Assignment is no longer experimental but only one of couple, whatever that means.

Not a bad idea at all, but I'm personally not fussed if it doesn't make it in with this set of changes (although feel free if you'd like to do the legwork). Probably worth raising another issue for it if you would prefer to do it down the track

@scheals
Copy link
Contributor

scheals commented Jun 7, 2022

I believe some sort of update to the Pattern Matching lesson might be in order because from what I've gathered some form of Rightward Assignment is no longer experimental but only one of couple, whatever that means.

Not a bad idea at all, but I'm personally not fussed if it doesn't make it in with this set of changes (although feel free if you'd like to do the legwork). Probably worth raising another issue for it if you would prefer to do it down the track

I will raise a new issue, seems most reasonable to me.

@scheals
Copy link
Contributor

scheals commented Jun 7, 2022

I've gone through the exercise repos and made sure nothing blows up. People's tests still passed without any trouble!

@ChargrilledChook
Copy link
Member Author

@scheals Great effort, thanks for your work on this. I don't currently have access to the Custom Enumerables repo so I can't merge that one, but the rest are all sorted. It should be fine in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Ruby/Rails Involves the full stack Ruby on Rails path
Projects
None yet
Development

No branches or pull requests

3 participants