curriculum icon indicating copy to clipboard operation
curriculum copied to clipboard

Ruby Course: Installing Ruby - Update ruby version

Open karimdevelops opened this issue 1 year ago • 6 comments

Because

The latest stable version is 3.3.5 and there are no major changes:

Ruby 3.3.5 has been released. This is a routine update that includes minor bug fixes. We recommend upgrading your Ruby version at your earliest convenience. For more details, please refer to the GitHub release notes.

Link: https://www.ruby-lang.org/en/news/2024/09/03/3-3-5-released/

This PR

  • Update 8 references of ruby version 3.3.4 to 3.3.5

Pull Request Requirements

  • [x] I have thoroughly read and understand The Odin Project curriculum contributing guide
  • [x] The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • [x] The Because section summarizes the reason for this PR
  • [x] The This PR section has a bullet point list describing the changes in this PR
  • [x] If this PR addresses an open issue, it is linked in the Issue section
  • [x] If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • [x] If any lesson files are included in this PR, they follow the Layout Style Guide

karimdevelops avatar Oct 19 '24 14:10 karimdevelops

Thank you for making this change!

We like to keep the Ruby version that's used in this installation lesson in sync with the Ruby version that is used for other repos in The Odin Project.

Would you be okay with bumping the Ruby versions in the Main App repo and the Ruby testing repo? If you've never done that type of thing and don't feel comfortable doing so, I can handle it myself. Just wanted to offer to you if you're interested.

I'd love it do it! But sadly I am not exactly sure how to do it... Should I just clone it, make changes in the markdown file and then make a pull request? I really want to do it, I'd appreciate your help.

karimdevelops avatar Oct 20 '24 12:10 karimdevelops

@karimdevelops You'll need to do a few things

  • Fork those repositories, and then make local clones of those forks onto your machine.
  • Both repositories determine the used ruby version from the .ruby-version file that's in the root of the project. Open up that file and change the ruby version to 3.3.5 (the version we'll be using here).
  • If you don't have that version of Ruby installed, you'll need to do so. Can follow the instructions in the installing Ruby lesson if you need guidance on that.
  • Try bundling the project's dependencies by running bundle install. If it fails to bundle, there are conflicts that will need to be resolved with the new Ruby version against the different libraries used by the project. Untangling that will be a more complicated process, and I'll probably have to take it over. But if it does bundle successfully, then you can feel free to submit a PR with those changes.
  • We'll also have to make sure CI passes for the main app repo, but given that it's just a patch version bump for the main app repo, I don't expect any problems with that.

If you have any other questions about any of those instructions, just let me know and I'll be glad to answer them.

JoshDevHub avatar Oct 20 '24 18:10 JoshDevHub

@JoshDevHub It successfully worked! I will make a PR soon. I faced only one problem (which was fixed) bundle install returned one err in main repo: An error occurred while installing pg (1.5.7), and Bundler cannot continue. but then after a quick search I installed postgresql sudo pacman -S postgresql, then no errors were returned and it successfully worked. Enough talking, I will make the PR now!

edit: CI is left... I suppose I need to follow this?

edit2: 3/4 tests ran successfully, I cannot run rspec test :/ This is the rspec error, I cannot resolve it:

To use multipart middleware with Faraday v2.0+, install `faraday-multipart` gem; note: this is used by the ManageGHES client for uploading licenses
[WARN] couldn't connect to database. Skipping PublicActivity::Activity#parameters's serialization

An error occurred while loading rails_helper.
Failure/Error: ActiveRecord::Migration[6.0].maintain_test_schema!

ActiveRecord::ConnectionNotEstablished:
  connection to server at "::1", port 5432 failed: Connection refused
  	Is the server running on that host and accepting TCP/IP connections?
  connection to server at "127.0.0.1", port 5432 failed: Connection refused
  	Is the server running on that host and accepting TCP/IP connections?
# ./spec/rails_helper.rb:12:in `<top (required)>'
# ------------------
# --- Caused by: ---
# PG::ConnectionBad:
#   connection to server at "::1", port 5432 failed: Connection refused
#   	Is the server running on that host and accepting TCP/IP connections?
#   connection to server at "127.0.0.1", port 5432 failed: Connection refused
#   	Is the server running on that host and accepting TCP/IP connections?
#   ./spec/rails_helper.rb:12:in `<top (required)>'
No examples found.


Finished in 0.00012 seconds (files took 5.73 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

karimdevelops avatar Oct 21 '24 02:10 karimdevelops

@karimdevelops I wouldn't worry about testing your changes locally. There are a lot of things that need to be set up, and I don't want you to have to jump through all that.

Instead just make a PR to the main theodinproject repo. There will be tests that take your changes and run remotely in an environment that has everything configured and set up already. These tests are what I meant by "CI". If the PR passes CI, it should be fine to merge it.

JoshDevHub avatar Oct 21 '24 16:10 JoshDevHub

Sure mate

karimdevelops avatar Oct 21 '24 16:10 karimdevelops

@JoshDevHub I will create two seperate pull requests, I guess? Creating them now

edit: You can check them now: Main repo and Ruby testing

karimdevelops avatar Oct 21 '24 16:10 karimdevelops