Zendesk app tools - Known issues

Have more questions? Submit a request

22 Comments

  • Kevin Christensen
    Comment actions Permalink

    Had trouble installing on Debian, kept getting:

    Building native extensions. This could take a while...
    ERROR: Error installing zendesk\_apps\_tools:
    ERROR: Failed to build gem native extension.

    After some googling, found this this SO answer: http://stackoverflow.com/questions/12552929/failed-to-build-gem-native-extension-rails-install

    `mkmf`  is part of the  `ruby1.9.1-dev`  package. This package contains the header files needed for extension libraries for Ruby 1.9.1. You need to install the  `ruby1.9.1-dev`  package by doing:

    sudo apt-get install ruby1.9.1-dev

    0
  • Sean Kinney
    Comment actions Permalink

    Thanks for sharing your solution, Kevin! This is the same cause as the errors listed above for Mac OS X and Windows so it's great to have a solution for Debian as well.

    0
  • EricDahl
    Comment actions Permalink

    Dan, I'm getting an error when I try 'zat bump major'

    ericdahaptop755:Take 5 From 5 2 edahl$ zat bump major
    /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/zendesk_apps_tools-1.22.2/lib/zendesk_apps_tools/manifest_handler.rb:34:in `read_version': undefined method `to_h' for [[:v, nil], [:major, "0"], [:minor, "0"], [:patch, "0"]]:Array (NoMethodError)
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/zendesk_apps_tools-1.22.2/lib/zendesk_apps_tools/manifest_handler.rb:10:in `block (2 levels) in '
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor/invocation.rb:109:in `invoke'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor.rb:232:in `block in subcommand'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/gems/zendesk_apps_tools-1.22.2/bin/zat:5:in `'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/bin/zat:23:in `load'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/bin/zat:23:in `'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `eval'
    from /Users/edahl/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `'

    0
  • Dan Beirouty
    Comment actions Permalink

    Hi Eric!

    I've noticed you submitted a support ticket about your issue. I trust that Creighton's suggestion worked for you; if you have any further questions, please don't hesitate to reply to the ticket and re-open it.

    For anyone else who may be interested in the error Eric experienced, the 'bump' feature is relatively new and was developed for a newer version of Ruby. The feature should work perfectly if you're using Ruby 2.1.0 or above. Please upgrade your Ruby installation to take advantage of the new feature (or install rvm and rvm use 2.1.0 before using ZAT).

    0
  • Robert Aronovici
    Comment actions Permalink

    Help!

    I'm receiving this message now after updating Ruby and the 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/rbreadline.rb:17: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/site_ruby/2.2.0/readline.rb:10:in `<module:Readline>'
            from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/readline.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/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]

     

    1
  • Andrew Dietrich
    Comment actions Permalink

    Hi Robert, 

    I'm unfortunately not a backend (i.e. Ruby) expert, but I ran through the steps to install Ruby 2.2.6 + the ZAT gem on a fresh Windows computer, and we found two things:

      1. We needed to install the DevKit in addition to Ruby itself, which is available on the ruby downloader site: http://rubyinstaller.org/downloads/
      2. We also had the same UTF-8 encoding error. To fix it, we ran "set RUBYOPT=-E utf-8". However that setting appears to have been applied to locally, so for convenience you may want to apply it to the top level directory.

    I also notice that in your errors, it keeps referring to Ruby 2.2.0, but I see at the end your ruby -v returns 2.2.6. Perhaps a full reinstall of Ruby would help?

    If you're still having issues, let me know and we can pull this into a ticket and hopefully loop in our developers.

     

    0
  • Andy Parkerson
    Comment actions Permalink

    I'm having problems validating. I am running Windows 10, Ruby 2.3.3, and am getting the following error:

    C:\vagrant\www\shopperschoice\intranet\crm-apps\zendesk\user_info>zat validate
    info Checking for new version of zendesk_apps_tools
    C:/Ruby23/lib/ruby/2.3.0/net/http.rb:933:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (OpenSSL::SSL::SSLError)
    from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:933:in `connect'
    from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
    from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:852:in `start'
    from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:584:in `start'
    from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:479:in `get_response'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/zendesk_apps_tools-2.8.1/lib/zendesk_apps_tools/command.rb:283:in `check_for_update'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/zendesk_apps_tools-2.8.1/lib/zendesk_apps_tools/command.rb:71:in `validate'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/zendesk_apps_tools-2.8.1/bin/zat:13:in `<top (required)>'
    from C:/Ruby23/bin/zat:23:in `load'
    from C:/Ruby23/bin/zat:23:in `<main>'

    C:\vagrant\www\shopperschoice\intranet\crm-apps\zendesk\user_info>ruby -v
    ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]

    I have installed Node.js 8.9.3.

    Any advice?

     

    1
  • Andy Parkerson
    Comment actions Permalink

    It turned out to be a Ruby issue. I solved it by following the directions here: https://stackoverflow.com/questions/4528101/ssl-connect-returned-1-errno-0-state-sslv3-read-server-certificate-b-certificat

    It calls for downloading a file cacert.pem from http://curl.haxx.se/ca/cacert.pem, and setting the appropriate environment variable:

    set SSL_CERT_FILE=C:\Ruby23\cacert.pem

    This entire process of installing Ruby and ZAT on a Windows machine is much harder than it should be.

     

    4
  • Adrien Delannoy
    Comment actions Permalink

    Upgrading to the last version of Ruby (v2.4.1) solved this issue on my OS X 

    Building native extensions.  This could take a while...
    
    ERROR: Error installing zendesk_apps_tools:
    ERROR: Failed to build gem native extension.

     

    0
  • Bryan - Community Manager
    Comment actions Permalink

    For others following this thread, the environment fix when having issues with 'zat' on native Windows can be found here:

    https://support.zendesk.com/hc/en-us/articles/360000520468-zat-error-OpenSSL-SSL-SSLError-on-Windows

    For those who are on Windows 10 and looking for more flexibility, check out the KB article Prep for app developers. It shows how to set up Zendesk Apps Tools (ZAT) using Windows Subsystem for Linux (WSL). It gets around these issues, still lets you maintain your overall Windows environment, and lets you use things like 'rbenv'.

    0
  • Eric Cogan
    Comment actions Permalink

    For anyone using Ubuntu for Windows 10 and having issues building the native extension, I'd recommend following the setup instructions from the Jekyll website https://jekyllrb.com/docs/installation/windows/#installation-via-bash-on-windows-10.

    Obviously substitute the last step where you'd install jekyll and instead install the zendesk_apps_tools.

    1
  • Max Völkel
    Comment actions Permalink

    I could install Ruby 2.7 easily on WIndows 10 via Chocolatey  https://chocolatey.org/

    0
  • Michael Chen
    Comment actions Permalink

    SOLVED for ZAT not displaying in zendesk even though installed correctly: 

    I was able to install zendesk_app_tools correctly (after following Jason Humphrey's comments https://develop.zendesk.com/hc/en-us/articles/360001075048/comments/360001647334 and was able to start the server correctly; however the app was frustratingly not showing up. 

    I finally figured out I had the wrong zendesk account, I was testing on a paid lite version, you need to have an enterprise version or a Sponsored Enterprise version, here: https://develop.zendesk.com/hc/en-us/articles/360001075048/comments/360001647334 

    1
  • George Campbell
    Comment actions Permalink

    Solved; on Ubuntu 18.04 for Windows after running `gem install zendesk_apps_tools` it gave the error:

    Error installing zendesk_apps_tools:
    ERROR: Failed to build gem native extension.
    mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

    And the solution for me was to run:

    `sudo apt-get install ruby-dev`

    And try again. This solved the issue for me.

    0
  • Andrew Attard
    Comment actions Permalink

    Confirming that George Campbell's solution worked for me as well.

    0
  • Josh Medeski
    Comment actions Permalink

    I am macOS Catalina 10.15.7 and have the xcode installed 12.1 (including the CLI tools) and I still get the following error:

    ERROR: Error installing zendesk_apps_tools:
    ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.7.0/gems/thin-1.7.2/ext/thin_parser

    2
  • Bryan - Community Manager
    Comment actions Permalink

    Josh Medeski — check out this other community link:

    https://develop.zendesk.com/hc/en-us/community/posts/360051859693/comments/360013269194

    Theres a stricter compile-time check with the newer version of Xcode that kicks in on this particular Ruby gem (i.e. thin).

    The workaround is to explicitly compile thin and turn off the check triggering this compile-time error.

    -1
  • Hemmachat Paramabuddhi
    Comment actions Permalink

    OK, after struggling to find how to make the ZAT tool to work on my machine, I found a proven way to make it to work on Windows 10 using WSL Ubuntu 20.04.1 LTS with Ruby 2.7.0 as of 17/02/2021. Here are the steps you need to follow:

    1. Open your Ubuntu Bash shell and update the list of the packages:
    $ sudo apt-get update

    2. Install the necessary packages:
    $ sudo apt-get install -y ruby ruby-dev build-essential dh-autoreconf zlib1g-dev nodejs

    3. Install rake:
    $ sudo gem install rake

    4. Install ZAT:
    $ sudo gem install zendesk_apps_tools

    Finally, you should have a working ZAT ready with some warnings but the main functionalities are good.

    1
  • Matt McGrath
    Comment actions Permalink

    Thanks Hemmachat, I was trying to do exactly this, and your  instructions finally helped me get there!

     

    Cheers!

    0
  • David Andrews
    Comment actions Permalink

    I am using macOS 11.2.3 & ruby 2.6.3p62. I have followed the instructions for Mac OSX 'Failed to build native gem extensions OSX. I still get the same error when installing the tools:

    https://share.getcloudapp.com/yAuD1pL0

    Any suggestions?

     

     

    1
  • Josh
    Comment actions Permalink

    David Andrews, I suggest running with pindar's docker container by running the following command:

    docker run --rm -v (pwd):/data -p 4567:4567 -it pindar/zat zat {your command}

    Hope it helps, it's made it really easy for me!

    0
  • Aleksey Kislov
    Comment actions Permalink

    Would be great if we could disable autoreloading of `zat server` on assets changes e.g. to utilize webpack HMR functionality.

    0

Please sign in to leave a comment.

Powered by Zendesk