How to remove warning "RubyZip 3.0 is coming!"

Viewed 1094

I just did a bundle update on my Rails 6 app, and since I have a long warning every time I bundle exec something :

RubyZip 3.0 is coming!
**********************

The public API of some Rubyzip classes has been modernized to use named
parameters for optional arguments. Please check your usage of the
following classes:
 * `Zip::File`
 * `Zip::Entry`
 * `Zip::InputStream`
 * `Zip::OutputStream`

Please ensure that your Gemfiles and .gemspecs are suitably restrictive
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
See https://github.com/rubyzip/rubyzip for details. The Changelog also
lists other enhancements and bugfixes that have been implemented since
version 2.3.0.

I don't have rubyzip in my Gemfile, it's a dependancy of webdrivers and selenium-webdriver, libraries used to get a headless browser for Capybara testing.

What can I do to get rid of this warning ?

1 Answers

This warning was added in rubyzip 2.3.1 to give people time to get ready for the 3.0 release which will have breaking changes. If you don't want to see the warning just lock the rubyzip version to 2.3.0 in the development/test section of your Gemfile

gem 'rubyzip', '2.3.0'
Related