ruby / ruby2_keywords

Shim library for Module#ruby2_keywords

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`private_method_defined?': wrong number of arguments (given 2, expected 1) in ruby2_keywords.rb

swikars1 opened this issue · comments

Successfully installed ruby2_keywords-0.0.3
Successfully installed faraday-1.3.0
Successfully installed rendezvous-0.1.3
Successfully installed netrc-0.11.0
Successfully installed dpl-heroku-1.10.16
7 gems installed
/usr/local/bundle/gems/ruby2_keywords-0.0.3/lib/ruby2_keywords.rb:2:in private_method_defined?': wrong number of arguments (given 2, expected 1) (ArgumentError) from /usr/local/bundle/gems/ruby2_keywords-0.0.3/lib/ruby2_keywords.rb:2:in class:Module'
from /usr/local/bundle/gems/ruby2_keywords-0.0.3/lib/ruby2_keywords.rb:1:in <top (required)>' from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'
from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/rack_builder.rb:3:in <top (required)>'
from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'
from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday.rb:20:in <top (required)>' from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'
from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' from /usr/local/bundle/gems/dpl-heroku-1.10.16/lib/dpl/provider/heroku.rb:1:in <top (required)>'
from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in require' from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in rescue in require'
from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in require' from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/provider.rb:93:in rescue in block in new'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/provider.rb:68:in block in new' from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/cli.rb:41:in fold'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/provider.rb:67:in new' from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/cli.rb:31:in run'
from /usr/local/bundle/gems/dpl-1.10.16/lib/dpl/cli.rb:7:in run' from /usr/local/bundle/gems/dpl-1.10.16/bin/dpl:5:in <top (required)>'
from /usr/local/bundle/bin/dpl:23:in load' from /usr/local/bundle/bin/dpl:23:in

'
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1

ruby2_keywords-0.0.3 is only compatible with ruby 2.6+

It was compatible so far with ruby 2.5. Can't we keep it that way ?

Broke for me as well. How can I fix this?

@doudou I suspect that it's kinda getting irrelevant as the EOL date for ruby 2.5 is 2021-03-31, it's soon.
If you're still using ruby 2.5 in your project you may simply lock ruby2_keywords to be < 0.0.3 in your Gemfile.

gem 'ruby2_keywords', '< 0.0.3'

Yeah. That's what I am doing now. But tbh, for something that's already a workaround for a messy transition (I know that's the best transition that could be done given the situation, but it is still de-facto messy, with no fault from any core developer), keeping backward compatibility longer would seem to be a really good idea.

Ubuntu 18.04 has 2.5 and is an ubuntu LTS (5 years, until 2023).

@FunkyloverOne Any idea how do I fix this using this deploy script for Heroku from GitLab?
image

same my heroku cicd was work fine yesterday suddenly next deploy job failed without reason any workaround without locking version

@aekanshd, I don't know how to fix it without version locking, sorry.

should I create a issue in dpl gem

@aekanshd, I don't know how to fix it without version locking, sorry.

i just saw your pr, is it fixed?

@swikars1 we should wait until the gem maintainers approve and merge my PR, and release a newer version. I expect this might happen tomorrow.