Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asciidoctor-epub3 unavailable on PATH on MacOS #322

Closed
odrotbohm opened this issue Mar 5, 2020 · 7 comments
Closed

asciidoctor-epub3 unavailable on PATH on MacOS #322

odrotbohm opened this issue Mar 5, 2020 · 7 comments
Labels

Comments

@odrotbohm
Copy link

I followed the installation instructions and end up with this one:

$ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install asciidoctor-epub3 --pre
Successfully installed asciidoctor-epub3-1.5.0.alpha.14
Parsing documentation for asciidoctor-epub3-1.5.0.alpha.14
Done installing documentation for asciidoctor-epub3 after 0 seconds
1 gem installed
$ asciidoctor-epub3 -v
-bash: asciidoctor-epub3: command not found
$ gem list

*** LOCAL GEMS ***

…
asciidoctor (2.0.10)
asciidoctor-diagram (2.0.1)
asciidoctor-epub3 (1.5.0.alpha.14)
asciidoctor-pdf (1.5.3)
…
$ gem info asciidoctor-epub3

*** LOCAL GEMS ***

asciidoctor-epub3 (1.5.0.alpha.14)
    Authors: Dan Allen, Sarah White
    Homepage: https://github.com/asciidoctor/asciidoctor-epub3
    License: MIT
    Installed at: /usr/local/lib/ruby/gems/2.7.0

    Converts AsciiDoc documents to EPUB3 and KF8/MOBI (Kindle) e-book
    formats

Anyone seen this before?

@odrotbohm
Copy link
Author

I can run the script by explicitly pointing to the gem binaries:

/usr/local/lib/ruby/gems/2.7.0/gems/asciidoctor-epub3-1.5.0.alpha.14/bin/asciidoctor-epub3 

@slonopotamus
Copy link
Contributor

I suspect this is not asciidoctor-epub3 specific, but something with your Ruby installation. I expect gem install to install executables to /usr/local/lib/ruby/gems/2.7.0/bin directory, which is supposed to be on PATH.

Is it true that this not only happens with asciidoctor-epub3 but with any other gem? Can you execute asciidoctor, for example? It is already installed because it is asciidoctor-epub3 dependency, so you can just try to run it.

@slonopotamus slonopotamus added this to the support milestone Mar 5, 2020
@odrotbohm
Copy link
Author

It's the only gem that's misbehaving, hence I suspected it to be something wrong here.

I find asciidoctor and asciidoctor-pdf to have a binary placed in /usr/local/bin/, which explains why I can run those directly. I might have lost track about which of the tools I had installed via Homebrew and which ones were plain gems but it looks like asciidoctor-pdf is not available via Homebrew which makes me assume the binary in /usr/local/bin has been placed there by gem.

I am not a Ruby person in the firstplace, but if /usr/local/lib/ruby/gems/2.7.0/bin is supposed to be on the path, isn't that something, I'd have to touch with each Ruby upgrade? That feels odd.

@slonopotamus
Copy link
Contributor

I am not a Ruby person in the firstplace

Me neither, hehe.

According to StackOverflow, you need to add bin dirs to PATH if you install Ruby via HomeBrew.

@slonopotamus
Copy link
Contributor

I'd have to touch with each Ruby upgrade?

Only when you switch to a different major release. And you would need to reinstall gems because they install for particular Ruby version.

@slonopotamus slonopotamus changed the title Failure to install the binaries asciidoctor-epub3 unavailable on PATH on MacOS Mar 5, 2020
@slonopotamus
Copy link
Contributor

You may also want to read asciidoctor/asciidoctor-pdf#1238

@slonopotamus
Copy link
Contributor

Let's pretend this is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants