Login  Register

Re: Pygments fails because Asciidoctor uses system gem despite brew

Posted by Syzygies on Mar 10, 2019; 4:21am
URL: https://discuss.asciidoctor.org/Pygments-fails-because-Asciidoctor-uses-system-gem-despite-brew-tp6783p6792.html

I have multiple machines, and I was able to trace the bug to homebrew's recipe for installing Asciidoctor.

Homebrew calls the gem command associated with the system Ruby, even if a more modern Ruby is earlier on the PATH. This then requires that one uses the full path to that gem command for Asciidoctor maintenance, such as adding Pygment support.

Clearly, one shouldn't use homebrew; just use gem, as the Asciidoctor documentation specifies. Many of us will automatically use a homebrew formula if available, so the formula should at least give a warning.

I could have worded the rest better: If one Googles issues with Asciidoctor not finding pygments.rb, one sees past problems but not past solutions. This was disconcerting enough for me to consider reverting to Asciidoc. I'm trying to help here so you don't give the wrong impression to other new users.