`translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)



Posted Mar 12, 2025

I'm following the instructions to install ZenDesk App Tools - [Installing and using ZAT - Zendesk Developers](https://developer.zendesk.com/documentation/apps/zendesk-app-tools-zat/installing-and-using-zat/)

I'm new to using Ruby!!!!

**The Main Problem**

[Updating ZAT](https://developer.zendesk.com/documentation/apps/zendesk-app-tools-zat/installing-and-using-zat/#updating-zat)

When running `zat create` or `zat validate`, I get the error **`translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)**.

```
zat validate 
       info  Checking for new version of zendesk_apps_tools
/var/lib/gems/3.0.0/gems/i18n-1.14.7/lib/i18n.rb:211:in `translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
       from /var/lib/gems/3.0.0/gems/zendesk_apps_support-4.38.3/lib/zendesk_apps_support/i18n.rb:7:in `t'
       from /var/lib/gems/3.0.0/gems/zendesk_apps_support-4.38.3/lib/zendesk_apps_support/validations/validation_error.rb:53:in `to_s'
       from /var/lib/gems/3.0.0/gems/zendesk_apps_tools-3.9.2/lib/zendesk_apps_tools/command.rb:111:in `block in validate'
       from /var/lib/gems/3.0.0/gems/zendesk_apps_tools-3.9.2/lib/zendesk_apps_tools/command.rb:111:in `each'
       from /var/lib/gems/3.0.0/gems/zendesk_apps_tools-3.9.2/lib/zendesk_apps_tools/command.rb:111:in `validate'
       from /var/lib/gems/3.0.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
       from /var/lib/gems/3.0.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
       from /var/lib/gems/3.0.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
       from /var/lib/gems/3.0.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
       from /var/lib/gems/3.0.0/gems/zendesk_apps_tools-3.9.2/bin/zat:13:in `<top (required)>'
       from /usr/local/bin/zat:25:in `load'
       from /usr/local/bin/zat:25:in `<main>'
```

I'm running Linux Mint 21.

Kernel: 5.15.0-134-generic x86_64 bits: 64 compiler: gcc v: 11.4.0
Desktop: Cinnamon 6.0.4 Distro: Linux Mint 21.3 Virginia
base: Ubuntu 22.04 jammy

```
ruby -v
ruby 2.6.9p207 (2021-11-24 revision 67954) [x86_64-linux]
```
```
rbenv -v
rbenv 1.1.2
```
```
zat -v
3.9.2
```

The .zat file in the root of my app directory.

```
{
 "subdomain": "mycompany",  
 "username": "me@mycompany.co.uk",  
 "password": "**********************",
 "zat_latest": "3.9.2",
 "zat_update_check": "2025-03-12"
}
```

**Things I've tried**

1. I'm able to run zat server and test the app locally

> zat server --path src/zat_app

== Sinatra (v2.2.3) has taken the stage on 4567 for development with backup from Thin
2025-03-12 08:19:37 +0000 Thin web server (v1.8.2 codename Ruby Razor)
2025-03-12 08:19:37 +0000 Maximum connections set to 1024
2025-03-12 08:19:37 +0000 Listening on 0.0.0.0:4567, CTRL+C to stop
127.0.0.1 - - [12/Mar/2025:08:19:44 +0000] "GET /agent/tickets/321 HTTP/1.1" 404 653 0.0519
127.0.0.1 - - [12/Mar/2025:08:20:02 +0000] "GET /agent/tickets/321?zat=true HTTP/1.1" 404 653 0.0040

I get the following message in the page running locally, which I guess is to be expected at this stage.

http://localhost:4567/agent/tickets/321?zat=true

```
# in var/lib/gems/3.0.0/gems/zendesk_apps_tools-3.9.2/lib/zendesk_apps_tools/server.rb
class ZendeskAppsTools::Server
 get '/agent/tickets/321' do
   "Hello World"
 end
end
```

2. As per [ZAT known issues - ZenDesk Developers](https://developer.zendesk.com/documentation/apps/zendesk-app-tools-zat/zat-known-issues/)

2a. Install rake and reinstall zat

> sudo gem install rake
> sudo gem install zendesk_apps_tools

I recieved an error when not running as sudo.

```
gem install zendesk_apps_tools
Fetching ffi-1.17.1-x86_64-linux-gnu.gem
ERROR:  Error installing zendesk_apps_tools:
    The last version of ffi (>= 0.5.0, < 2) to support your Ruby & RubyGems was 1.17.1. Try installing it with `gem install ffi -v 1.17.1` and then running the current command again
    ffi requires RubyGems version >= 3.3.22. The current RubyGems version is 3.0.3.1. Try 'gem update --system' to update RubyGems itself.
```

2b. Install/Update ffi (with sudo)

> sudo gem install ffi -v 1.17.1
> sudo gem update --system

3. Install rbenv-2.6.10

At first I ran rbenv install 2.6.9 (as recommended in the instruction) with the following output and similar success for 2.6.10...

```
rbenv install 2.6.9
rbenv: /home/daverussellaspire/.rbenv/versions/2.6.9 already exists
continue with installation? (y/N) y
==> Downloading openssl-1.1.1w.tar.gz...
-> curl -q -fL -o openssl-1.1.1w.tar.gz https://dqw8nmjcqpjn7.cloudfront.net/cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100 9661k  100 9661k    0     0   926k      0  0:00:10  0:00:10 --:--:-- 1213k
==> Installing openssl-1.1.1w...
-> ./config "--prefix=$HOME/.rbenv/versions/2.6.9/openssl" "--openssldir=$HOME/.rbenv/versions/2.6.9/openssl/ssl" --libdir=lib zlib-dynamic no-ssl3 shared "-Wl,-rpath,$HOME/.rbenv/versions/2.6.9/openssl/lib"
-> make -j 4
-> make install_sw install_ssldirs
==> Installed openssl-1.1.1w to /home/daverussellaspire/.rbenv/versions/2.6.9
==> Downloading ruby-2.6.9.tar.bz2...
-> curl -q -fL -o ruby-2.6.9.tar.bz2 https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.9.tar.bz2
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100 13.4M  100 13.4M    0     0   563k      0  0:00:24  0:00:24 --:--:--  766k
==> Installing ruby-2.6.9...

WARNING: ruby-2.6.9 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.

-> ./configure "--prefix=$HOME/.rbenv/versions/2.6.9" "--with-openssl-dir=$HOME/.rbenv/versions/2.6.9/openssl" --enable-shared --with-ext=openssl,psych,+
-> make -j 4
-> make install

==> Installed ruby-2.6.9 to /home/daverussellaspire/.rbenv/versions/2.6.9
```

 


0

0

0 comments

Please sign in to leave a comment.

Didn't find what you're looking for?

New post