Open marmalodak opened 3 years ago
@marmalodak This is a bit of a invalid use case for brew gem
since you are really doing:
brew install brew-gem
brew gem install asciidoctor
brew gem install asciidoctor-diagram
In which you are installing asciidoctor
with a plugin, asciidoctor-diagram
. As mentioned in the README.md
:
brew gem
allows you to install any rubygem as a homebrew formula.It works by generating a stub formula for homebrew...
This formula installs and unpacks all the dependencies under the Cellar path. So the package is completely self contained.
The "self contained" part being the key words here. You can see what I mean by taking a look at the generated bin
file for your asciidoctor
installation:
$ which asciidoctor
/usr/local/bin/asciidoctor
#!/usr/local/opt/ruby/bin/ruby --disable-gems
ENV['GEM_HOME']="/usr/local/Cellar/gem-asciidoctor/2.0.15"
ENV['GEM_PATH']="/usr/local/Cellar/gem-asciidoctor/2.0.15"
require 'rubygems'
$:.unshift("/usr/local/Cellar/gem-asciidoctor/2.0.15/gems/asciidoctor-2.0.15/lib")
load "/usr/local/Cellar/gem-asciidoctor/2.0.15/gems/asciidoctor-2.0.15/bin/asciidoctor"
The /usr/local/Cellar/gem-asciidoctor/2.0.15
is the self contained gem path. This means that the brew gem install asciidoctor-diagram
was placed into it's own /usr/local/Cellar/gem-asciidoctor-diagram
dir, and the asciidoctor
bin has no knowledge of it's existence.
An unsupported work around for this is the following:
$ brew gem install asciidoctor
$ export GEM_HOME=/usr/local/Cellar/gem-asciidoctor/2.0.15
$ export GEM_PATH=/usr/local/Cellar/gem-asciidoctor/2.0.15
/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/gem install asciidoctor-diagram
But I think at this point, the use case for using brew gem
in this fashion is less desirable.
Thank you for your thoughtful response.
The following worked well:
However, using asciidoctor-diagram doesn't seem to work:
What can I do to make this work?