Closed maxandersen closed 9 years ago
On Fri, Aug 15, 2014 at 2:24 AM, Max Rydahl Andersen < notifications@github.com> wrote:
Constants DL and Fiddle is not defined
This seems to be a problem in rjb (the Ruby Java bridge).
Here's the line where that error gets thrown: https://github.com/arton/rjb/blob/master/ext/load.c#L134
Could you try on Ruby 2.0 or above (since the commit mentions something about Ruby 2.0)?
I don't think this is an issue in graphviz or Asciidoctor Diagram core...it seems to be an issue in rjb (obviously, we still want to figure it out, just suggesting where to look).
-Dan
Dan Allen | http://google.com/profiles/dan.j.allen
@mojavelinux if I'm interpreting the rjb code correctly it's trying to require 'dl' or 'fiddle' and then checking that the 'DL' or 'Fiddle' constants are defined. For some reason I guess that's failing, but I have no idea why. Those are both standard library modules so I wouldn't expect that to fail.
@arton If you have some time, could you perhaps shed some light on the situations in which the error at https://github.com/arton/rjb/blob/master/ext/load.c#L134 actually gets raised? I would like to reproduce the scenario described above, but have no idea where to start.
Just tried with ruby 2.0 and things then did not fail in this way but hitting #39 instead.
Hi pepijnve. I have no idea because if ruby version under 2.0 should have DL and greater or equal 2.0 may have Fiddle. Rjb requires one of them for loading JVM into memory. The code you mentioned is 'if state != 0 then require failed' or 'if DL/Fiddle was not defined then unknown error was happened'. One possibility is using RVM or such environment changer caused conflicts between shared objects and ruby itself.
@maxandersen unless you object I'm going to close this issue as not reproducible. I don't know where to start in fixing this if I can't set up a test case for it. It also seems to an rjb and environment combination issue rather than something in the asciidoctor-diagram code that I can fix. Is that ok for you?
I would suggest leaving it open in a milestone called "Deferred" (or similar) and add the label "needs-test" (or similar). That way, people know that a) it could happen and b) we can address it once its reproducible. We don't want to give an impression that a solution was found, or that we completely understand the problem.
Ok. Different projects, different practices. At work we use jira and 'resolve' issues like this with 'cannot reproduce'. They tend to stay open indefinitely otherwise and clutter up the issue list. But no objections to leaving it open.
@mojavelinux could you create an appropriate label? I can't do that it seems since I'm not the repo owner.
Geez, permissions on GitHub are so overly restrictive. Even though you are the administrator on the repository, the highest permission I can grant you, it doesn't let you do certain things like create labels. So annoying.
Okay, I setup a bunch of labels. If you need more, just let me know (file an issue).
I don't claim to know what I'm doing, but I do know that when I see issues closed in other projects with no code change or troubleshooting steps, I really feel lost. Thus, I want to see if we can tie up all issues that we close that way...and leave issues open that we can't.
You should try to schedule every issue for a milestone (even future), so that unscheduled issues (or those scheduled in Deferred) don't show by default. This helps us plan the project anyway.
Again, if you want to do it another way, no problem. My suggestions shouldn't trump yours...they are just suggestions :)
When I say, "don't show by default", I mean that you would look at issues by milestone instead of just all open issues. Obviously, we can't control what GitHub shows by default :)
GitHub only has two issue states so the labels and milestones work for me.
I was about to give you a custom fork of https://github.com/jbosstools/jbosstools-website which showed the problem but after I reverted to ruby 1.9 on this things continues to work. gdamn'it ;/
So yeah, i'm okey calling this non-reproducible and closing.
Since this can't be reproduced by myself or the reporter of the issue and the RJB maintainer has no idea what might be wrong either I don't think it's useful anymore to keep this issue open (even if we've already marked it as deferred).
Sounds good.
I've been able to reproduce this on my local machine.
rbenv install 1.9.3-p484
gem install rjb
irb
Rjb::load([])
This triggers the same error. Looks like this is an Rjb/CRuby 1.9.3/Mac OSX issue. Root cause is not in asciidoctor-diagram. If I find some time to reproduce this in a clean VM I'll report an issue against Rjb.
Thanks for tracking this down, @pepijnve!
(I'm adding this to my list of reasons to encourage folks to upgrade to Ruby 2 & beyond).
Resolved by #48
I've added the following to Gemfile:
gem 'asciidoctor', '1.5.0' gem 'asciidoctor-diagram'
Run bundle update.
Added require 'asciidoctor-diagram' to pipeline.rb
If i do not run 'brew install graphviz' I get #41
When I have run 'brew install graphviz' I get:
"Constants DL and Fiddle is not defined."
When trying to render
Full stacktrace is: