After my failed attempt to gem-install it including dependencies bundled locally, I'll just instead ask operations to do it the "right" way via a Debian package published in Wikimedia's aptitude/ubuntu repository and installing it via Puppet on gallium.wikimedia.org.
I however have no idea how to do this so I need someone in operations to do this instead (which will need to be involved anyway to push it to ubuntu.wikimedia.org).
The following page may be useful, though I couldn't figure it out:
The source code of JSDuck is here:
Latest stable version as of writing is v4.6.2:
It is published on RubyGems:
The popular installation procedure is simply "gem install jsduck".
The source code includes a gemspec where the runtime dependencies are declared.
The created bundle worked locally but failed on gallium.