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

Update default Ruby version to 3.3.7 #1534

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Conversation

schneems
Copy link
Contributor

@schneems schneems commented Jan 6, 2025

The latest Ruby is now 3.4.x. Our ideal default policy is to use the latest release of the prior year's version. This PR updates to the latest Ruby 3.3.x version which is 3.3.7.

@schneems schneems force-pushed the schneems/default-ruby-336 branch 2 times, most recently from bc8afc7 to 8ca07fc Compare January 6, 2025 15:59
The latest Ruby is now 3.4.x. Our ideal default policy is to use the latest release of the prior year's version. This PR updates to the latest Ruby 3.3.x version which is 3.3.6.
@andreas-venturini
Copy link

@schneems could now default to 3.3.7 https://www.ruby-lang.org/en/news/2025/01/15/ruby-3-3-7-released/

@schneems schneems force-pushed the schneems/default-ruby-336 branch from 8ca07fc to 9848194 Compare January 21, 2025 21:02
@schneems schneems changed the title Update default Ruby version to 3.3.6 Update default Ruby version to 3.3.7 Jan 21, 2025
Fixes:

```
       -----> Building on the Heroku-24 stack
       -----> Fetching https://github.com/heroku/heroku-buildpack-ruby#schneems/default-ruby-336 buildpack...
              buildpack downloaded
       -----> Ruby app detected
       
        !
        !     undefined method `exists?' for class Dir
        !
       /tmp/buildpacks/55030ecaa578151bf5924184e8750b99212faef5/lib/language_pack/helpers/bundler_wrapper.rb:242:in `fetch_bundler': undefined method `exists?' for class Dir (NoMethodError)
           return true if Dir.exists?(bundler_path)
                             ^^^^^^^^
       Did you mean?  exist?
```
@schneems schneems force-pushed the schneems/default-ruby-336 branch from 72886a1 to 43f05b6 Compare January 27, 2025 23:14
Bundler 1.x is not able to run with Ruby 3.3 in some circumstances:

```
       remote:  !     There was an error parsing your Gemfile, we cannot continue        
       remote:  !     /tmp/d20250127-138-l8vq2r/bundler-1.17.3/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29:in `root': undefined method `untaint' for an instance of Pathname (NoMethodError)        
       remote:  !             
       remote:  !     Pathname.new(gemfile).untaint.expand_path.parent  
```

This commit updates the default bundler version to 2.3.x.
This asserts that we ignore invalid or incorrect patch numbers i.e. p0 in the gem file.lock is not correct:

```
RUBY VERSION
   ruby 2.5.1p0
```

We don't really need to keep and maintain this fixture.
@schneems schneems force-pushed the schneems/default-ruby-336 branch from 4a7d509 to 9356404 Compare February 4, 2025 19:15
This no longer builds on the platform:

```
       remote:  !     There was an error parsing your Gemfile, we cannot continue        
       remote:  !     /tmp/d20250204-129-9ld2nw/bundler-1.17.3/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29:in `root': undefined method `untaint' for an instance of Pathname (NoMethodError)        
       remote:  !             
       remote:  !     Pathname.new(gemfile).untaint.expand_path.parent        
       remote:  !     ^^^^^^^^        
       remote:  !     from /tmp/d20250204-129-9ld2nw/bundler-1.17.3/gems/bundler-1.17.3/lib/bundler.rb:234:in `root'        
       remote:  !     from /tmp/d20250204-129-9ld2nw/bundler-1.17.3/gems/bundler-1.17.3/lib/bundler.rb:246:in `app_config_path'       
```
@schneems schneems force-pushed the schneems/default-ruby-336 branch from 081e6b6 to c05a1b5 Compare February 5, 2025 21:42
@schneems schneems force-pushed the schneems/default-ruby-336 branch from 34cbc47 to 2a0eb3d Compare February 10, 2025 23:23
@schneems schneems marked this pull request as ready for review February 11, 2025 00:02
@schneems schneems requested a review from a team as a code owner February 11, 2025 00:02
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 this pull request may close these issues.

2 participants