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 Course: Installing Ruby - Update ruby version #28973

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

karimdevelops
Copy link
Contributor

@karimdevelops karimdevelops commented Oct 19, 2024

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

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • 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
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: Ruby Involves the Ruby course label Oct 19, 2024
Copy link
Contributor

@JoshDevHub JoshDevHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JoshDevHub JoshDevHub added the Status: Do Not Merge This PR should not be merged until further notice label Oct 19, 2024
@JoshDevHub JoshDevHub self-assigned this Oct 19, 2024
@karimdevelops
Copy link
Contributor Author

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.

@JoshDevHub
Copy link
Contributor

JoshDevHub commented Oct 20, 2024

@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.

@karimdevelops
Copy link
Contributor Author

karimdevelops commented Oct 21, 2024

@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

@JoshDevHub
Copy link
Contributor

JoshDevHub commented Oct 21, 2024

@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.

@karimdevelops
Copy link
Contributor Author

Sure mate

@karimdevelops
Copy link
Contributor Author

karimdevelops commented Oct 21, 2024

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

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

JoshDevHub pushed a commit to TheOdinProject/theodinproject that referenced this pull request Oct 22, 2024
<!-- Thank you for taking the time to contribute to The Odin Project. In
order to get this pull request (PR) merged in a reasonable amount of
time, you must complete this entire template. -->

## Because
<!-- Summarize the purpose or reasons for this PR, e.g. what problem it
solves or what benefit it provides. -->
This pull request links to my prev [pull
request](TheOdinProject/curriculum#28973)
I have bumped it in the main repo

## This PR
<!-- A bullet point list of one or more items describing the specific
changes. -->
- Bump ruby version to 3.3.5 in main repo

## Pull Request Requirements
<!-- Replace the whitespace between the square brackets with an 'x',
e.g. [x]. After you create the PR, they will become checkboxes that you
can click on. -->
- [x] I have thoroughly read and understand [The Odin Project
Contributing
Guide](https://github.com/TheOdinProject/.github/blob/main/CONTRIBUTING.md)
- [x] The title of this PR follows the `location of change: brief
description of change` format, e.g. `String spec: Update instructions
for clarity`
-   [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 this PR includes changes in the `spec` folder, they are also
updated in the corresponding file in the `spec_answers` folder (with
passing tests).
@JoshDevHub JoshDevHub merged commit 9ac1961 into TheOdinProject:main Nov 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: Ruby Involves the Ruby course Status: Do Not Merge This PR should not be merged until further notice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants