public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Daniel Abrahamsson <daniel.abrahamsson@prover.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Problems with asciidoctor gem after ruby update
Date: Thu, 27 Apr 2023 11:12:59 +0000	[thread overview]
Message-ID: <AS8PR08MB6936E8DCABAA808C93D838D2E96A9@AS8PR08MB6936.eurprd08.prod.outlook.com> (raw)

Hi,

I’m not sure if the issue is cygwin-specific or not, but I do not have a linux box with a sufficiently new version of ruby to test with. The errors started showing up after the recent updates of the ruby and rubygems packages.

When installing asciidoctor via `gem install asciidoctor`, a asciidoctor "binary" is placed in "$HOME/bin". However, when running `asciidoctor` I get:

```
$ asciidoctor
/home/daab/bin/asciidoctor: line 6: /home/daab/bin/ruby: No such file or directory
```

The asciidoctor binary is looking for ruby in the wrong place (it should be looking for the system ruby).

Version output:
```
$ asciidoctor -v
Asciidoctor 2.0.18 [https://asciidoctor.org]
Runtime Environment (ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-cygwin]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
$ ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-cygwin]
$ gem -v
3.4.12
```

The asciidcoctor binary on the upgraded system starts with these lines:

```
#!/bin/sh
# -*- ruby -*-
_=_\
=begin
bindir="${0%/*}"
exec "$bindir/ruby" "-x" "$0" "$@"
=end
#!/usr/bin/ruby.exe
#
# This file was generated by RubyGems.
```

On a non-upgraded system, we instead have:

```
#!/usr/bin/ruby.exe
#
# This file was generated by RubyGems.
#
# The application 'asciidoctor' is installed as part of a gem, and
# this file is here to facilitate running it.
#
```
require 'rubygems'

// Daniel


             reply	other threads:[~2023-04-27 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 11:12 Daniel Abrahamsson [this message]
2023-04-27 20:36 ` Daisuke Fujimura
2023-04-28 13:10   ` Daisuke Fujimura
2023-05-01  6:36     ` Daniel Abrahamsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS8PR08MB6936E8DCABAA808C93D838D2E96A9@AS8PR08MB6936.eurprd08.prod.outlook.com \
    --to=daniel.abrahamsson@prover.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).