# Installing and using the Zendesk apps tools Follow

• awesome

• nice!

• Indeed, this helps a LOT!

• Is it possible to pass the parameters in the "zat server" command, or even better, could the server be configured to read from an config file?

• Olaf Kwant

Yes. From version 1.20.0 it will automatically read from a settings.yml file in your current working directory. Or you pass it a file with the -c option.

• Looks like the latest version of Ruby is 2.1.3. Will that work, or should we use 1.9.3 explicitly?

• I'm using the latest Windows install, which is 2.0.0p481, and it seems to work just like it should.

• I'm getting an error when I try to run "zat validate" or "zat package" ("zat new" and "zat server" work fine); I've tried it with Ruby 1.9.3 and Ruby 2.0.0. This is on Windows 8.

C:/Ruby200/lib/ruby/gems/2.0.0/gems/execjs-2.2.2/lib/execjs/external_runtime.rb:
62:in extract_result': SyntaxError: Expected identifier, string or number (Exec
JS::RuntimeError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/execjs-2.2.2/lib/execjs/externa
l_runtime.rb:29:in exec'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jshintrb-0.2.4/lib/jshintrb/lin
t.rb:65:in lint'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/validations/source.rb:40:in jshint_error'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/validations/source.rb:46:in block in jshint_errors'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/validations/source.rb:45:in each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/validations/source.rb:45:in each_with_object'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/validations/source.rb:45:in jshint_errors'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/validations/source.rb:34:in call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/package.rb:29:in block in validate'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/package.rb:24:in tap'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.16.1/lib
/zendesk_apps_support/package.rb:24:in validate'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_tools-1.21.0/lib/z
endesk_apps_tools/command.rb:47:in validate'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb
:27:in run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation
.rb:120:in invoke_command'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in
dispatch'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:43
9:in start'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/zendesk_apps_tools-1.21.0/bin/z
at:5:in '
from C:/Ruby200/bin/zat:23:in load'
from C:/Ruby200/bin/zat:23:in '

• Sorry. I donot know how to figure out what url I should enter in my local browser. When I came to this here ( In your favorite browser, navigate to any ticket in Zendesk. The URL should look something like this: https://subdomain.zendesk.com/agent/tickets/321).
Any help will be appreciated!

• Hi Allen,

In the URL you referenced above, you would replace "subdomain" with the subdomain you selected when you signed up for your Zendesk account.

If you don't currently use Zendesk, then you don't have a subdomain. You can sign up for a free 30-day trial here: https://www.zendesk.com/register.

Hope that helps!

• Thanks Jessie.
I am very new to your app.
But when I came to the step 6, I did not find "reload app" icon.
And I cannot put my screenshot into this comment. :(

• Finally I made it work.

• Hi Allen!

I'm glad to hear you got things up and running! If you need anything else, please don't hesitate to reach out here in the forums, or send a ticket in to support@zendesk.com.

• Hi, I'm having the same issue as Jacob. Were you able to resolve it in the end Jacob?

or

Type: "sudo gem update zendesk_apps_tools" on your console.

• I have the latest version of ZAT -- I got the error within an hour of installing it, and just now tried to do the gem update and got "nothing to update".

@Christopher Stock -- the error has not resolved. I was able to deploy my app by simply zipping up the directory and uploading it, but couldn't use ZAT for the validate or package steps.

• @Jacob Mattison - i think i may need to communicate directly to investigate further on your issue. Expect an email from me as i will be creating a Support ticket for you to have this issue resolved.

• Arthur, any updates on this?
My gem is update-to-date as well.
Running Ruby 2.0 on my Win8 box.
I'm experiencing the same issues as Jacob (Validate and the Package commands throws and error).
Thanks!

• Hi again, after skimming through these topics, I found this, which helped tremendously!
https://support.zendesk.com/hc/en-us/articles/203691376-Zendesk-app-tools-Known-issues-#topic_aln_yrh_3n

• Hi Robert!

I'm so glad you found what you needed! Please give a shout if you need anything else. :)

• For all Docker users: I prepared a docker image for ZAT and it's available on dockerhub: https://registry.hub.docker.com/u/pindar/zat/

• Same problem as Jacob has, I am getting this error on zat validate and zat package only:

PS C:\ms_app> zat validate
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-2.3.0/lib/execjs/external_runtime.rb:65:in extract_result': SyntaxError:
Expected identifier, string or number (ExecJS::RuntimeError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-2.3.0/lib/execjs/external_runtime.rb:32:in exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-2.3.0/lib/execjs/external_runtime.rb:14:in initialize'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-2.3.0/lib/execjs/runtime.rb:44:in new'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-2.3.0/lib/execjs/runtime.rb:44:in compile'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-2.3.0/lib/execjs/module.rb:27:in compile'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jshintrb-0.2.4/lib/jshintrb/lint.rb:48:in initialize'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:51:in new'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:51:in linter'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:39:in jshint_error'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:45:in block in jshint_errors'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:44:in each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:44:in each_with_object'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:44:in jshint_errors'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/validations/so
urce.rb:33:in call'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/package.rb:28:
in block in validate'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/package.rb:24:
in tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_support-1.17.1/lib/zendesk_apps_support/package.rb:24:
in validate'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_tools-1.22.2/lib/zendesk_apps_tools/command.rb:47:in 
validate'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in invoke_command'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in dispatch'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/zendesk_apps_tools-1.22.2/bin/zat:5:in '
from C:/Ruby200-x64/bin/zat:23:in load'
from C:/Ruby200-x64/bin/zat:23:in '

• Hi Kousha,

Check out this doc and let me know if you're still getting an error: https://support.zendesk.com/hc/en-us/articles/203691376-Zendesk-app-tools-Known-issues-#topic_aln_yrh_3n

Angie

• When I'm running zat server, is it also supposed to stop me from affecting the zendesk tickets themselves? For example, say my app has a button that changes the ticket status to "pending" and add a "we'll get back to you" canned comment. If I click that button while ?zat=true, then will it change that ticket in real life?

• Hi Mzhu,

Any changes made while '?zat=true' runs will be changed just like in real life. We recommend making a test account, populating it with test data, and experimenting on that. If you have any questions about how to set up a testing account, just let me know. Also, what are you making?

Angie

• I'm also not getting the Apps button in the upper right that is usually there, so I can't load the app.

I'm running Mac OS X 10.10.5 and the latest version of zendesk_apps_tools.

The Zat server is running from the app folder.

I followed the steps in here too:
https://support.zendesk.com/hc/en-us/articles/203691376-Zendesk-app-tools-Known-issues-#topic_aln_yrh_3n

No luck.

What did I do wrong?

• I got it to work when creating a test app through: zat new

But couldn't get my existing app to run through there. I guess I'll just try to start fresh and port stuff over until I can figure out what the issue is.

• Awesome article, Charles. Exceedingly clear and helpful. Thank you!!

• @Jacob and @Kousha

I know it's a bit late in the day, but here's the issue.

The zat system needs a Javascript runtime to do the validate and package commands - because he's actually running your app through Javascript to detect errors or issues befor zipping it up. Unfortunately the installation documentation above doesn't mention this.

I use Node.js, which can be found here ... https://nodejs.org/en/

Install that, and then try again, If it still fails, you may also need to manually update ExecJS through ruby,so it will get the latest version that detects your Javascript runtime.

gem install execjs

Oh, and sometimes, he's a bit fussy with paths ... enter this on your command line

PATH=C:\Ruby200-x64\bin;C:\Program Files\nodejs

Using the appropriate paths to your Ruby exe and Node JS exe files respectively.

Hope this helps.

• Help! I just updated my Ruby and gem packages.

c:\Projects\Zendesk\pi_integration>zat validate RUBYOPT -E utf-8
Warning: unexpected string encoding: IBM437, zat runs best in UTF-8.
Please set the RUBYOPT environment variable to "-E utf-8".
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rbreadline.rb:1097:in <module:RbReadline>': HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory (RuntimeError)
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/readline.rb:10:in <module:Readline>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor/line_editor/readline.rb:2:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor/line_editor.rb:2:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor/base.rb:8:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/thor-0.19.4/lib/thor.rb:2:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/zendesk_apps_tools-1.37.4/lib/zendesk_apps_tools/command.rb:1:in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/zendesk_apps_tools-1.37.4/bin/zat:13:in <top (required)>'
from C:/Ruby22-x64/bin/zat:22:in load'
from C:/Ruby22-x64/bin/zat:22:in <main>'

c:\Projects\Zendesk\pi_integration>ruby -v
ruby 2.2.6p396 (2016-11-15 revision 56800) [x64-mingw32]

Has anyone run into this issue?