https://discuss.asciidoctor.org/Gem-paths-craziness-on-cygwin-tp3425p3426.html
I explained the situation in detail in the following comment:
The simple solution is to update your PATH environment variable so that it can see the launch script (e.g., asciidoctor or asciidoctor-pdf). Once the launch script is found, Ruby will handle the rest.
If you're on Cygwin, by default `gem install` will install the gem into your home directory. The launch scripts (aka binstubs) will end up in the bin directory. Thus, you need to add $HOME/bin to your PATH environment variable.
$ export PATH="$HOME/bin:$PATH"
(Cygwin really should setup the PATH this way by default).
If you're in an environment where `gem install` installs the gem to system location, such as /usr/local/bin, then you need to add this path to your PATH environment variable instead.
$ export PATH="/usr/local/bin:$PATH"
You shouldn't need to mess with GEM_PATH unless you want the gems to install to a different location than the default.
Different distributions (including Cygwin and OSX) like to setup Ruby differently. This is not really Ruby's fault. These distributions are just being difficult IMO...
which is why I like and recommend RVM (
https://rvm.io). RVM manages the Ruby environment so that it just works. It rarely, if ever, lets me down.
Cheers,
-Dan