Skip to content

Add cgi gem to prevent Ruby 4 warning - #138

Merged
koppen merged 2 commits into
substancelab:mainfrom
andyw8:fix/ruby4-cgi
Aug 31, 2026
Merged

Add cgi gem to prevent Ruby 4 warning#138
koppen merged 2 commits into
substancelab:mainfrom
andyw8:fix/ruby4-cgi

Conversation

@andyw8

@andyw8 andyw8 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor
/Users/andy/.local/share/mise/installs/ruby/4.0.6/lib/ruby/gems/4.0.0/gems/capybara-3.40.0/lib/capybara/rack_test/driver.rb:7:
warning: CGI library is removed from Ruby 4.0. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.

(Ideally this should be fixed upstream in capybara but the last release was in 2024).

Copilot AI lite review requested due to automatic review settings August 31, 2026 16:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds the cgi gem to the development bundle to silence Ruby 4.x warnings emitted when Capybara/Rack::Test loads CGI (which is no longer part of Ruby’s standard library in Ruby 4).

Changes:

  • Add cgi as a Bundler dependency to avoid Ruby 4 “CGI library is removed” warnings triggered by Capybara.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@koppen

koppen commented Aug 31, 2026

Copy link
Copy Markdown
Member

Thanks again, you are on a roll, @andyw8 :)

We only have cgi in the Gemfile because capybara depends on it.  It is
not used directly by our code, so move it down to be with capybara.
Copilot AI review requested due to automatic review settings August 31, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@koppen
koppen merged commit 76b7289 into substancelab:main Aug 31, 2026
6 checks passed
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.

3 participants