mislav/will_paginate

ruby 2.7 warning

elad-eyal opened this issue · 2 comments

I get this with ruby 2.7

[...]vendor/bundle/ruby/2.7.0/gems/will_paginate-3.2.1/lib/will_paginate/railtie.rb:66: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

This is a warning, one of many, which started with Ruby 2.7. You can read about a work around to decrease the noise here.

Short work around:
Launch console with an environment variable:
RUBYOPT='-W:no-deprecated -W:no-experimental' rails c

Or (this is what I did) you can add RUBYOPT to your shell profile. I use ZSH so I added the following to my .zshrc file:
export RUBYOPT='-W:no-deprecated -W:no-experimental'

These are ways to quiet down the warnings.

I think it was resolved by 1e26621 .