Skip to content

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Mar 11, 2025

This pull request adds Ruby 3.4 to CI matrix.

yahonda added 2 commits March 11, 2025 15:53
Previously, it attemps to install bundler 2.4.21 while Ruby version is 3.4.
https://github.com/rails/thor/actions/runs/13782104138/job/38542040661?pr=899

```
  /opt/hostedtoolcache/Ruby/3.4.2/x64/bin/gem install bundler -v 2.4.21
  Successfully installed bundler-2.4.21
  1 gem installed
  Took   0.37 seconds
```
@yahonda
Copy link
Member Author

yahonda commented Mar 11, 2025

Confirmed the bundler version installed as expected.

Installing Bundler
  /opt/hostedtoolcache/Ruby/2.7.8/x64/bin/gem install bundler -v 2.4.21
  Successfully installed bundler-2.4.21
  1 gem installed
  Took  14.16 seconds
Installing Bundler
  /opt/hostedtoolcache/Ruby/3.4.2/x64/bin/gem install bundler -v ~> 2.0
  Successfully installed bundler-2.6.5
  1 gem installed
  Took   0.45 seconds

This commit addresses the following error:
```ruby
% ruby -v
ruby 3.5.0dev (2025-03-11T00:00:47Z master 47c3ae6962) +PRISM [arm64-darwin24]
~/src/github.com/rails/thor %
% bundle exec rspec ./spec/actions/create_link_spec.rb
/Users/yahonda/src/github.com/rails/thor/spec/helper.rb:18: warning: rdoc used to be loaded from the standard library, but is not part of the default gems since Ruby 3.5.0.
You can add rdoc to your Gemfile or gemspec to fix this error.

An error occurred while loading ./spec/actions/create_link_spec.rb. - Did you mean?
                    rspec ./spec/actions/create_file_spec.rb

Failure/Error: require "rdoc"

LoadError:
  cannot load such file -- rdoc
No examples found.

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

Coverage report generated for RSpec to /Users/yahonda/src/github.com/rails/thor/coverage.
Line Coverage: 34.9% (511 / 1464)
[Coveralls] Outside the CI environment, not sending data.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
%
```

Refer to:
ruby/ruby#12577
https://bugs.ruby-lang.org/issues/20309
@yahonda
Copy link
Member Author

yahonda commented Mar 11, 2025

Addressed CI against Ruby 3.5 aka head by adding the rdoc to address this error:

% ruby -v
ruby 3.5.0dev (2025-03-11T00:00:47Z master 47c3ae6962) +PRISM [arm64-darwin24]
% bundle exec rspec ./spec/actions/create_link_spec.rb
/Users/yahonda/src/github.com/rails/thor/spec/helper.rb:18: warning: rdoc used to be loaded from the standard library, but is not part of the default gems since Ruby 3.5.0.
You can add rdoc to your Gemfile or gemspec to fix this error.

An error occurred while loading ./spec/actions/create_link_spec.rb. - Did you mean?
                    rspec ./spec/actions/create_file_spec.rb

Failure/Error: require "rdoc"

LoadError:
  cannot load such file -- rdoc
# ./spec/helper.rb:18:in '<top (required)>'
# ./spec/actions/create_link_spec.rb:1:in '<top (required)>'
No examples found.


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

Coverage report generated for RSpec to /Users/yahonda/src/github.com/rails/thor/coverage.
Line Coverage: 34.9% (511 / 1464)
[Coveralls] Outside the CI environment, not sending data.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
%

This commit addresses the following error:
```ruby
% ruby -v
ruby 3.5.0dev (2025-03-11T00:00:47Z master 47c3ae6962) +PRISM [arm64-darwin24]
~/src/github.com/rails/thor % vi GE
% bundle exec rspec ./spec/line_editor_spec.rb

An error occurred while loading ./spec/line_editor_spec.rb. - Did you mean?
                    rspec ./spec/line_editor/basic_spec.rb

Failure/Error: require "readline"

LoadError:
  cannot load such file -- readline
No examples found.

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

Coverage report generated for RSpec to /Users/yahonda/src/github.com/rails/thor/coverage.
Line Coverage: 41.55% (920 / 2214)
[Coveralls] Outside the CI environment, not sending data.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
```

Refer to https://bugs.ruby-lang.org/issues/20309
@yahonda
Copy link
Member Author

yahonda commented Mar 11, 2025

Addressed CI failure against Ruby 3.5 aka head by adding rdoc and readline to Gemfile that will be separated as bundled gems.

@yahonda yahonda merged commit 44c4cac into rails:main Mar 11, 2025
9 checks passed
@yahonda
Copy link
Member Author

yahonda commented Mar 11, 2025

Refer to ruby/ruby#12624 that moves readline to bundled gem.

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.

1 participant