Skip to content

Add ruby@4.0 to the CI matrix - #153

Merged
raysrashmi merged 1 commit into
arunagw:masterfrom
seanpdoyle:ruby-4-0
Jan 19, 2026
Merged

Add ruby@4.0 to the CI matrix#153
raysrashmi merged 1 commit into
arunagw:masterfrom
seanpdoyle:ruby-4-0

Conversation

@seanpdoyle

@seanpdoyle seanpdoyle commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

According to Ruby 4.0's Release Notes, the stdlib no longer includes the CGI library by default. This means that CGI.parse is no longer available without explicitly requiring the cgi gem as a dependency.

To uncover this requirement, add 4.0 to the ruby matrix in the GitHub actions configuration file, then add cgi as a dependency to the gemspec.

Without explicit access, attempts to OAuth fail with an error message including:

undefined method 'parse' for class CGI: NoMethodError, undefined method 'parse' for class CGI

@seanpdoyle

Copy link
Copy Markdown
Contributor Author

@arunagw I may need some assistance in getting CI to bundle install properly:

https://github.com/arunagw/omniauth-twitter/actions/runs/21002962530/job/60421304927?pr=153#step:3:39

> bundle install
Setting BUNDLER_VERSION=4 for "bundle config|lock" commands below to ensure Bundler 4 is used
/opt/hostedtoolcache/Ruby/4.0.1/x64/bin/bundle config set --local path /home/runner/work/omniauth-twitter/omniauth-twitter/vendor/bundle
/opt/hostedtoolcache/Ruby/4.0.1/x64/bin/bundle lock
Writing lockfile to /home/runner/work/omniauth-twitter/omniauth-twitter/Gemfile.lock
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Could not find compatible versions

Because the current Bundler version (4.0.3) does not satisfy bundler ~> 2.0
  and Gemfile depends on bundler ~> 2.0,
  version solving has failed.

Your bundle requires a different version of Bundler than the one you're running.
Install the necessary version with `gem install bundler:2.7.2` and rerun bundler
using `bundle _2.7.2_ lock`

Is that something you're familiar with troubleshooting?

@raysrashmi

Copy link
Copy Markdown
Collaborator

@seanpdoyle Removed the bundler dependency in this PR #155 .
please rebase master

According to [Ruby 4.0's Release Notes][notes], the stdlib no longer
includes the CGI library by default. This means that `CGI.parse` is no
longer available without explicitly requiring the `cgi` gem as a
dependency.

To uncover this requirement, add `4.0` to the `ruby` matrix in the
GitHub actions configuration file, then add `cgi` as a dependency to the
gemspec.

[notes]: https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/#stdlib-compatibility-issues
@seanpdoyle

Copy link
Copy Markdown
Contributor Author

@raysrashmi thank you for the help! This is rebased and ready for CI to execute.

@raysrashmi
raysrashmi merged commit e898df6 into arunagw:master Jan 19, 2026
9 checks passed
@seanpdoyle
seanpdoyle deleted the ruby-4-0 branch January 19, 2026 16:31
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