If the `--build-root` option is specified for the `gem` command, the value of the `--bindir` option must be a relative path. https://github.com/rubygems/rubygems/blob/v3.4.12/lib/rubygems/installer.rb#L678-L679 This problem seems to have occurred since this commit. https://github.com/cygwin/cygport/commit/18bd795f82d3abeff333d35ce089dd55fa2b192c