最近の検索


最近の検索はありません

zat validate (and zat package) throws a "wrong number of arguments" error

回答済み


投稿日時:2022年5月18日

TLDR: it looks like the zendesk_apps_support/i18n.rb calls into that gem with the wrong number of arguments (I suspect the i18n gem is much newer than the zendesk_apps_support version is expecting)

 

When I run `zat validate` (or zat package) I get an error:

/Users/chrispellett/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.10.0/lib/i18n.rb:210:in `translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
        from /Users/chrispellett/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/zendesk_apps_support-4.32.0/lib/zendesk_apps_support/i18n.rb:7:in `t'
        from /Users/chrispellett/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/zendesk_apps_support-4.32.0/lib/zendesk_apps_support/validations/requests.rb:38:in `insecure_http_requests_warning'
        from /Users/chrispellett/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/zendesk_apps_support-4.32.0/lib/zendesk_apps_support/validations/requests.rb:18:in `block in call'

[...snip...]


0

3

3件のコメント

Thanks for pointing that out Chris! I reached out to the team that maintains ZAT and ZCLI to discuss whether we want to fix that in the ZAS gem or if we want update the docs to use an earlier version of Ruby. Or possibly something else, but I appreciate you letting us know about this!

0


Thanks Greg. I was referring to this document that showed Ruby v3 in its examples: https://developer.zendesk.com/documentation/apps/zendesk-app-tools-zat/installing-and-using-the-zendesk-apps-tools/

0


Hi again Chris! This particular error is a compatibility issue with Ruby 3.x.x and ZAT, and I see you're using 3.1.0. Or at least I think that's what I'm reading, since I don't even see 3.1.2 available with `rbenv install --list-all` ! Since ZAT is currently in maintenance mode, it's unlikely that this will be fixed, but I can run some tests and open a PR. For now, I recommend running with 2.7.0 locally if you want to use ZAT or you can switch over to ZCLI as I mentioned here.

Let me know if you have any other questions!

0


サインインしてコメントを残します。

お探しのものが見つかりませんか?

新規投稿