asciidoctor and pygments not working under cygwin64

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

asciidoctor and pygments not working under cygwin64

BigBlackDog
This post was updated on .
I have cygwin64 running on my win10 machine. I've installed Ruby v2.2.5p319, Python 2.7.12 and the following gems:

asciidoctor (1.5.5)
coderay (1.1.1)
json (1.8.2)
minitest (5.4.3, 4.7.5)
multi_json (1.12.1)
power_assert (0.2.2)
pygments.rb (1.1.1)
rake (10.4.2)
rdoc (4.2.0)
test-unit (3.0.8)

pygemts ist running at version 2.0.2-1. (edited post)

i have this simple document to test the syntax-highlighting with pygments:

= Document Title
Doc Writer <doc@example.com>
:doctype: book
:reproducible:
:source-highlighter: pygments
:listing-caption: Listing

A simple http://asciidoc.org[AsciiDoc] document.

== just a code sample
.Create a basic PDF document using Prawn
[source,ruby]
----
require 'prawn'

Prawn::Document.generate 'example.pdf' do
  text 'Hello, World!'
end
----

now, when i try and generate a html file by running asciidoctor test.adoc ... i get no output and the task keeps running and running and running without generating any output.

when i change the highligher to coderay i get the desired output. but i like the pygments output more and want to use it.

It was running on an older machine with earlier versions of everything.

can someone help me figure out whats going wrong?

thank you!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asciidoctor and pygments not working under cygwin64

mojavelinux
Administrator
The pygments.rb recently underwent an internal change to support Ruby >= 2.4 and JRuby. It no longer uses posix/spawn to invoke Python. Now it just uses popen4. There's a chance this change has caused a problem on Windows. But I run the Jekyll AsciiDoc tests on AppVeyor, which include calls to Pygments, and it works fine.


If you continue to have a problem, you probably need to report this to the pygments.rb project since Asciidoctor is simply delegating to that library.


You might try switching to Ruby 2.3 or 2.4, though I'm not confident that's where the issue is.

The other thing you can try is to install pygments.rb 0.6.3. This version will work on Ruby < 2.4.

$ gem uninstall pygments.rb
  gem install pygments.rb --version 0.6.3

That should at least restore the old behavior.

Cheers,

-Dan

On Thu, Jan 19, 2017 at 3:15 AM, BigBlackDog [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have cygwin64 running on my win10 machine. I've installed Ruby v2.2.5p319, Python 2.7.12 and the following gems:

asciidoctor (1.5.5)
coderay (1.1.1)
json (1.8.2)
minitest (5.4.3, 4.7.5)
multi_json (1.12.1)
power_assert (0.2.2)
pygments.rb (1.1.1)
rake (10.4.2)
rdoc (4.2.0)
test-unit (3.0.8)

i have this simple document to test the syntax-highlighting with pygments:

= Document Title
Doc Writer <[hidden email]>
:doctype: book
:reproducible:
:source-highlighter: pygments
:listing-caption: Listing

A simple http://asciidoc.org[AsciiDoc] document.

== just a code sample
.Create a basic PDF document using Prawn
[source,ruby]
----
require 'prawn'

Prawn::Document.generate 'example.pdf' do
  text 'Hello, World!'
end
----

now, when i try and generate a html file by running asciidoctor test.adoc ... i get no output and the task keeps running and running and running without generating any output.

when i change the highligher to coderay i get the desired output. but i like the pygments output more and want to use it.

It was running on an older machine with earlier versions of everything.

can someone help me figure out whats going wrong?

thank you!


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-and-pygments-not-working-under-cygwin64-tp5212.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asciidoctor and pygments not working under cygwin64

BigBlackDog
Thank you so much for your support!

Downgrading to pygments 0.6.3 did help me to get to the desired output.

I'll file a report there to help getting current versions work together.
Loading...