Closed johncblandii closed 3 years ago
Bump.
I was getting this also, and found out what the problem was, once I read the source, found popen.rb
, and and set the MENTOS_LOG
environment variable: my machine was under heavy load from a background process and mentos timed out. I simply edited my copy of popen.rb
in my installed gems directory to increase timeout_time
to a big number, and then pygments.rb worked again.
I see the same problem. My system is not under any load at all.
https://github.com/tmm1/pygments.rb/commit/e0ed7f73f03aa59680b469f4f26e208d3cf8d999 allows you to bypass the timeout problem that I wrote about in http://conscientiousprogrammer.com/blog/2013/06/29/nil-non-determinism-exceptions/
We've got the same problem when generating the "Jekyll powered" www.ruby-lang.org site (with over one thousand highlighted code snippets).
I've seen failing site builds with meaningless error messages for quite a long time on my (a little aged) machine, but did not investigate further. Since yesterday we let Travis test the builds, and already the third or fourth build failed, see https://github.com/ruby/www.ruby-lang.org/pull/682.
It took me quite some time to trace the problem down to Pygments and its unexpected (and not documented) timeout behaviour.
Increasing MENTOS_TIMEOUT is a solution that offers itself only to the users that are aware of the actual problem. So please consider changing this completely unexpected (= exceptional...) behaviour of returning nil
into something more easily to debug.
Jekyll is going to deal with the unexpected return value on their side, see https://github.com/jekyll/jekyll/pull/2148. I still think the exception should be raised by Pygments itself, though...
cc @FranklinChen
I've tried running this directly to no avail and through Jekyll [where nil is shown].
Returns just an empty line. When I run Jekyll I get the 'nil' error: