Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asciidoctorj-pdf jruby NoMethodError when attempting to execute #402

Closed
johncarl81 opened this issue Nov 3, 2015 · 34 comments
Closed

asciidoctorj-pdf jruby NoMethodError when attempting to execute #402

johncarl81 opened this issue Nov 3, 2015 · 34 comments

Comments

@johncarl81
Copy link
Member

I'm receiving the following error when trying to run this code to create a pdf:

asciidoctor.convertFile(
    new File("test.adoc"), 
    OptionsBuilder.options().toFile(new File("test.pdf")).inPlace(false).backend("pdf"));

Error:

[u61173@na42east1 ~]$ java -jar adt.jar  test.adoc
io/console not supported; tty will not be manipulated
Exception in thread "main" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `activate' for nil:NilClass
        at RUBY.try_activate(/.../test.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:198)
        at RUBY.require(/.../test.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:126)
        at RUBY.(root)(<script>:1)

I am using asiidoctorj 1.5.3.1, asciidoctorj-pdf 1.5.0-alpha.10 on a linux system.

Any help is appreciated.

@mojavelinux
Copy link
Member

This may be related to the Asciidoctor Diagram issue (since I see the same io/console warning). Can you verify which jars you are using in your adt.jar bundle?

@johncarl81
Copy link
Member Author

Im using the following:

        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj</artifactId>
            <version>1.5.3.1</version>
        </dependency>  
        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj-pdf</artifactId>
            <version>1.5.0-alpha.10</version>
        </dependency>

Here's mvn dependency:tree:

$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building asciiDoctorTest 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.asciidoctor:asciidoctorj:jar:1.5.3 is missing, no dependency information available
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ asciiDoctorTest ---
[INFO] test:asciiDoctorTest:jar:1.0.0-SNAPSHOT
[INFO] +- org.asciidoctor:asciidoctorj:jar:1.5.3.1:compile
[INFO] |  +- org.jruby:jruby-complete:jar:1.7.22:runtime
[INFO] |  \- com.beust:jcommander:jar:1.35:runtime
[INFO] \- org.asciidoctor:asciidoctorj-pdf:jar:1.5.0-alpha.10:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.124s
[INFO] Finished at: Tue Nov 03 14:31:00 MST 2015
[INFO] Final Memory: 12M/244M
[INFO] ------------------------------------------------------------------------

Granted, I have made the jar into a fat-jar using the jar-with-dependencies via the assembly plugin.

@robertpanzer
Copy link
Member

I'll take a look at it tomorrow.
I'm pretty exhausted today.
Maybe you could recheck with JRuby 1.7.21?

The error seems to be a little bit different than what we've seen with asciidoctorj-diagram where require_relative does not find the resource. (And it was Windows only)

Am 03.11.2015 um 22:31 schrieb John Ericksen [email protected]:

Im using the following:

    <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj</artifactId>
        <version>1.5.3.1</version>
    </dependency>  
    <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj-pdf</artifactId>
        <version>1.5.0-alpha.10</version>
    </dependency>

Here's mvn dependency:tree:

$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building asciiDoctorTest 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.asciidoctor:asciidoctorj:jar:1.5.3 is missing, no dependency information available
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ asciiDoctorTest ---
[INFO] test:asciiDoctorTest:jar:1.0.0-SNAPSHOT
[INFO] +- org.asciidoctor:asciidoctorj:jar:1.5.3.1:compile
[INFO] | +- org.jruby:jruby-complete:jar:1.7.22:runtime
[INFO] | - com.beust:jcommander:jar:1.35:runtime
[INFO] - org.asciidoctor:asciidoctorj-pdf:jar:1.5.0-alpha.10:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.124s
[INFO] Finished at: Tue Nov 03 14:31:00 MST 2015
[INFO] Final Memory: 12M/244M
[INFO] ------------------------------------------------------------------------

Granted, I have made the jar into a fat-jar using the jar-with-dependencies via the assembly plugin.


Reply to this email directly or view it on GitHub.

@johncarl81
Copy link
Member Author

Downgrading exposed a different error... here's what I'm getting now:

$ java -jar adt.jar
io/console not supported; tty will not be manipulated
asciidoctor: WARNING: test.adoc: line 4: section title out of sequence: expected level 2, got level 3
asciidoctor: WARNING: test.adoc: line 9: section title out of sequence: expected level 2, got level 3
asciidoctor: WARNING: test.adoc: line 18: section title out of sequence: expected level 2, got level 3
Nov 03, 2015 4:22:31 PM org.asciidoctor.internal.JRubyAsciidoctor renderFile
SEVERE: (NotImplementedError) fstat unimplemented unsupported or native support failed to load
Exception in thread "main" org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (NotImplementedError) fstat unimplemented unsupported or native support failed to load
        at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:345)
        at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:458)
        at org.asciidoctor.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:559)
        at com.kcp.ko.asciidoctortest.AsciiDocConverter.run(AsciiDocConverter.java:31)
        at com.kcp.ko.asciidoctortest.AsciiDocConverter.main(AsciiDocConverter.java:27)
Caused by: org.jruby.exceptions.RaiseException: (NotImplementedError) fstat unimplemented unsupported or native support failed to load
        at org.jruby.RubyFile.size(org/jruby/RubyFile.java:1160)
        at RUBY.render_body(/.../adt.jar!/gems/pdf-core-0.4.0/lib/pdf/core/document_state.rb:69)
        at RUBY.each(/.../adt.jar!/gems/pdf-core-0.4.0/lib/pdf/core/object_store.rb:70)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
        at RUBY.each(/.../adt.jar!/gems/pdf-core-0.4.0/lib/pdf/core/object_store.rb:69)
        at RUBY.render_body(/.../adt.jar!/gems/pdf-core-0.4.0/lib/pdf/core/document_state.rb:68)
        at RUBY.render_body(/.../adt.jar!/gems/pdf-core-0.4.0/lib/pdf/core/renderer.rb:192)
        at RUBY.render(/.../adt.jar!/gems/pdf-core-0.4.0/lib/pdf/core/renderer.rb:157)
        at RUBY.render(/.../adt.jar!/gems/prawn-1.3.0/lib/prawn/document.rb:356)
        at RUBY.render_file(/.../adt.jar!/gems/prawn-1.3.0/lib/prawn/document.rb:364)
        at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1183)
        at RUBY.render_file(/.../adt.jar!/gems/prawn-1.3.0/lib/prawn/document.rb:364)
        at RUBY.write(/.../adt.jar!/gems/asciidoctor-pdf-1.5.0.alpha.10/lib/asciidoctor-pdf/converter.rb:2072)
        at RUBY.write(/.../adt.jar!/gems/asciidoctor-1.5.3/lib/asciidoctor/document.rb:1067)
        at RUBY.convert(/.../adt.jar!/gems/asciidoctor-1.5.3/lib/asciidoctor.rb:1519)
        at RUBY.convert_file(/.../adt.jar!/gems/asciidoctor-1.5.3/lib/asciidoctor.rb:1587)
        at RUBY.convertFile(<script>:68)
        at org.jruby.gen.InterfaceImpl1822716395.convertFile(org/jruby/gen/InterfaceImpl1822716395.gen:13)

@mojavelinux
Copy link
Member

That's crazy that it's failing on fstat. Wow. Which JVM are you using?

@johncarl81
Copy link
Member Author

JRE 1.7.0_67 64 bit.

@robertpanzer
Copy link
Member

Just built a fat jar of asciidoctorj 1.5.3.1 and asciidoctorj-pdf 1.5.0-alpha.10 myself and it works:

  • on Linux and
  • on Windows if I downgrade JRuby to 1.7.21.

This is the pom that I used: (Remove the jruby dep for Linux)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>foo.bar</groupId>
    <artifactId>fatjartest</artifactId>
    <version>1.0-SNAPSHOT</version>

    <packaging>jar</packaging>

    <dependencies>

        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj</artifactId>
            <version>1.5.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj-pdf</artifactId>
            <version>1.5.0-alpha.10</version>
        </dependency>
        <dependency>
            <groupId>org.jruby</groupId>
            <artifactId>jruby-complete</artifactId>
            <version>1.7.21</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

@mojavelinux
Copy link
Member

Excellent!

I didn't get a chance to test it today because I've been super heads down preparing my talk for Devoxx. But I'm going to try to test asap.

@mojavelinux
Copy link
Member

I can confirm that AsciidoctorJ 1.5.3.2 + AsciidoctorJ PDF 1.5.0.alpha.10.1 (when I build them from source) work on Windows without specifying the JRuby version, whereas AsciidoctorJ 1.5.3.1 + AsciidoctorJ 1.5.0.alpha.10 (from the repositories) does not. I tried with both Java 7 and Java 8 (Oracle versions).

I think we're stuck with the io/console warning for now since that seems to be related to JRuby and is still being reported in the JRuby issue tracker.

So I give it a thumbs up!

Interestingly, when I used AsciidoctorJ PDF 1.5.0.alpha.10, I got an error on a completely different line than what was reported. It seems to me that JRuby 1.7.22 is a dud release, or at least a dud for us.

@mojavelinux
Copy link
Member

Btw, I checked the icons in PDF and they are working as well.

@mojavelinux
Copy link
Member

Oh, and I also tested AsciidoctorJ Diagram and that worked too (I just tested a ditaa diagram since I don't have dot installed on the Windows box).

@mojavelinux
Copy link
Member

But let's update rouge to 1.10.1.

@robertpanzer
Copy link
Member

👍 I will update the version, test again and then go for releasing 1.5.3.2.

@mojavelinux
Copy link
Member

What I can't figure out is how John is getting errors on Linux though. No matter what I try, Linux always works. Granted, there were a number of resources missing from the jars in the 1.5.3.1 cut, so it could have traced back to a missing resource somewhere. What I do know is that on Windows I'm able to see errors with 1.5.3.1 but everything works with 1.5.3.2.

@mojavelinux
Copy link
Member

There are two things I'm thinking are a possibility:

  • The Ruby environment is not clean and is leaking into JRuby. Run gem list and you should not see any gems other than system stuff.
  • There is something in the document that was triggering the loading of a gem that wasn't available.

What's in test.adoc?

What's the result of gem list?

I'm asking because I want to see if there's something we're not thinking about. But honestly, 1.5.3.2 looks as stable as any AsciidoctorJ version that preceded it.

@mojavelinux
Copy link
Member

One thing that should come out of this is a test project that we stick on GitHub for doing manual testing scenarios. Even better if we figure out how to turn those into integration tests, but sometimes, it's nice to have a project to fiddle with, so it may still be useful in addition to an integration test suite. It would save a lot of time instead of having to bootstrap a project. I can certainly contribute scripts from my end. We can call it something like asciidoctorj-manual-tests or something.

@johncarl81
Copy link
Member Author

Here's a little more information:
I'm attempting to get this running on one of our servers that has Ruby 1.8.7 installed (I can run ruby via the command line). Does JRuby use the system installed Ruby if it is available? I was able run my test on another linux system without Ruby installed.

gem list returns:

$ gem list

*** LOCAL GEMS ***

json (1.5.5)

I'm not sure how my administrators installed Ruby.

Here's the contents of test.adoc:

== Title
Body

Here's another wrinkle to this issue. I tried to run this same code via our application server, to exercise the non-fat-jar approach. I got this error:

Caused by: java.lang.NoSuchFieldError: RUBY2_0
        at org.asciidoctor.internal.JRubyAsciidoctor.createOptimizedConfiguration(JRubyAsciidoctor.java:152)
        at org.asciidoctor.internal.JRubyAsciidoctor.createJRubyAsciidoctorInstance(JRubyAsciidoctor.java:114)
        at org.asciidoctor.internal.JRubyAsciidoctor.create(JRubyAsciidoctor.java:62)
        at org.asciidoctor.Asciidoctor$Factory.create(Asciidoctor.java:647)
        at ....ReportGenerator.buildReport(ReportGenerator.java:48)
        ... 114 more

Could the problem be that JRuby is using the system install Ruby? Is there a way to configure this?

@robertpanzer
Copy link
Member

I cannot imagine that JRuby uses an implementation from a C Ruby except for sth like gems.

The field org.jruby.CompatVersion.RUBY_2_0 exists since JRuby 1.7.0!
As the class CompatVersion seems to be available, I would guess that there is some really old version of JRuby somewhere on the classpath.

Could you start the Java VM with the option -verbose:class ?
The output should reveal where the JRuby classes are loaded from.

Am 05.11.2015 um 17:00 schrieb John Ericksen [email protected]:

Here's a little more information:
I'm attempting to get this running on one of our servers that has Ruby 1.8.7 installed (I can run ruby via the command line). Does JRuby use the system installed Ruby if it is available? I was able run my test on another linux system without Ruby installed.

gem list returns:

$ gem list

*** LOCAL GEMS ***

json (1.5.5)
I'm not sure how my administrators installed Ruby.

Here's the contents of test.adoc:

== Title
Body

Here's another wrinkle to this issue. I tried to run this same code via our application server, to exercise the non-fat-jar approach. I got this error:

Caused by: java.lang.NoSuchFieldError: RUBY2_0
at org.asciidoctor.internal.JRubyAsciidoctor.createOptimizedConfiguration(JRubyAsciidoctor.java:152)
at org.asciidoctor.internal.JRubyAsciidoctor.createJRubyAsciidoctorInstance(JRubyAsciidoctor.java:114)
at org.asciidoctor.internal.JRubyAsciidoctor.create(JRubyAsciidoctor.java:62)
at org.asciidoctor.Asciidoctor$Factory.create(Asciidoctor.java:647)
at ....ReportGenerator.buildReport(ReportGenerator.java:48)
... 114 more
Could the problem be that JRuby is using the system install Ruby? Is there a way to configure this?


Reply to this email directly or view it on GitHub #402 (comment).

@johncarl81
Copy link
Member Author

working on it...

@johncarl81
Copy link
Member Author

Hmmm, it's loading it out of the correct jar:

[Loaded org.jruby.CompatVersion from file:/../application_war/WEB-INF/lib/jruby-complete-1.6.5.1.jar]

@johncarl81
Copy link
Member Author

I tried moving jruby out of the war and into an ejb to see if that made a difference. It did!... but it eventually errored. Now the current error is:

Caused by: org.jruby.exceptions.RaiseException: (NotImplementedError) fstat unimplemented unsupported or native support failed to load
        at org.jruby.RubyFile.size(org/jruby/RubyFile.java:1160)
        at RUBY.render_body(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/pdf-core-0.4.0/lib/pdf/core/document_state.rb:69)
        at RUBY.each(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/pdf-core-0.4.0/lib/pdf/core/object_store.rb:70)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
        at RUBY.each(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/pdf-core-0.4.0/lib/pdf/core/object_store.rb:69)
        at RUBY.render_body(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/pdf-core-0.4.0/lib/pdf/core/document_state.rb:68)
        at RUBY.render_body(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/pdf-core-0.4.0/lib/pdf/core/renderer.rb:192)
        at RUBY.render(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/pdf-core-0.4.0/lib/pdf/core/renderer.rb:157)
        at RUBY.render(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/prawn-1.3.0/lib/prawn/document.rb:356)
        at RUBY.render_file(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/prawn-1.3.0/lib/prawn/document.rb:364)
        at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1183)
        at RUBY.render_file(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/prawn-1.3.0/lib/prawn/document.rb:364)
        at RUBY.write(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/asciidoctor-pdf-1.5.0.alpha.10/lib/asciidoctor-pdf/converter.rb:2072)
        at RUBY.write(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-1.5.3.1.jar!/gems/asciidoctor-1.5.3/lib/asciidoctor/document.rb:1067)
        at RUBY.convert(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-1.5.3.1.jar!/gems/asciidoctor-1.5.3/lib/asciidoctor.rb:1519)
        at RUBY.convert_file(/app/glassfish/domains/domain1/applications/j2ee-apps/triageEventViewer-ear-1.1.38-SNAPSHOT/lib/asciidoctorj-1.5.3.1.jar!/gems/asciidoctor-1.5.3/lib/asciidoctor.rb:1587)
        at RUBY.convertFile(<script>:68)
        at org.jruby.gen.InterfaceImpl1785844449.convertFile(org/jruby/gen/InterfaceImpl1785844449.gen:13)

Im running this app server on Oracle Java:

java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

I feel like this is closer.

@robertpanzer
Copy link
Member

That's unfortunately not correct.
We require at least JRuby 1.7.+

It would be good to get JRuby 1.6 completely out of the way.
Context classloaders can do the rest to produce completely unimaginable results.

Am 05.11.2015 um 19:28 schrieb John Ericksen [email protected]:

Hmmm, it's loading it out of the correct jar:

[Loaded org.jruby.CompatVersion from file:/../application_war/WEB-INF/lib/jruby-complete-1.6.5.1.jar]

Reply to this email directly or view it on GitHub.

@johncarl81
Copy link
Member Author

Oh, that's odd... I'm including 1.7.21 explicitly... I'll try to upgrade.

@johncarl81
Copy link
Member Author

FYI, I did upgrade, which resulted in this

[Loaded org.jruby.CompatVersion from file:/.../lib/jruby-complete-1.7.21.jar]

and ended up erroring with the fstat NotImplementedError error mentioned above.

@robertpanzer
Copy link
Member

Wow, I'm completely clueless.

Just a wild guess, but are there maybe some jnr-* jars on the classpath that hide the classes from JRuby?

Am 05.11.2015 um 19:49 schrieb John Ericksen [email protected]:

FYI, I did upgrade, which resulted in this

[Loaded org.jruby.CompatVersion from file:/.../lib/jruby-complete-1.7.21.jar]
and ended up erroring with the fstat NotImplementedError error mentioned above.


Reply to this email directly or view it on GitHub.

@mojavelinux
Copy link
Member

Could the problem be that JRuby is using the system install Ruby? Is there a way to configure this?

By default, AsciiidoctorJ is now isolated from the system Ruby by default...I was just trying to think outside the box. After seeing the most recent traces I'm convinced that the problem is visibility within the deployment (not a system issue).

ended up erroring with the fstat NotImplementedError error mentioned above.

This seems to be where we need to focus. In what case is JRuby not able to load a native function. I know JRuby has been making changes to the FFI (native bridge) and this could be biting you. It would be very interesting for the JRuby devs.

See elastic/logstash#2962 (comment)

@johncarl81
Copy link
Member Author

I think I'll try downgrading JRuby a bit... maybe that will expose changes made along the way to this FFI component.

@johncarl81
Copy link
Member Author

FYI, it seems older versions of jruby show this error as well... I tired 1.7.5, 1.7.10, 1.7.15 and 1.7.21.

What would you suggest to try?

@johncarl81
Copy link
Member Author

Ok, we got to the bottom of it... seems that this was caused by the /tmp directory "noexec" option... we removed this and then we were able to generate pdfs!

Very strange issues.

@mojavelinux
Copy link
Member

That's fantastic news!

This seems like pretty critical information to know. Perhaps we should add it to the troubleshooting section (assuming there is one) in the README.

Thanks for tracking this down!

@johncarl81
Copy link
Member Author

Thanks for the help along the way. Yeah, it may make sense to add this to the README, although I wonder if it could be fixed in a more global way across JRuby. Do you have any contacts with the project that would be effective with this fix information?

@mojavelinux
Copy link
Member

Do you have any contacts with the project that would be effective with this fix information?

We have a great relationship with the JRuby leadership, so definitely.

@jhinrichsen
Copy link

We just got bitten by the very same error, in our case it was because we are using a tempfs filesystem (instead of ext4/ HFS+/ zfs in /tmp).

@mojavelinux
Copy link
Member

You can control which directory is used for temporary files by setting the $TMPDIR environment variable. That should allow you to work on the filesystem of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants