We're running into an issue when trying to generate a pdf using asciidoctorj-pdf. Interestingly this only appears on our production system, on our development system it works fine.
The code we're using to generate a pdf is pretty simple and straight from the website: Asciidoctor asciidoctor = Asciidoctor.Factory.create(); asciidoctor.convertFile(file, OptionsBuilder.options().backend("pdf")); The error we're seeing is when trying to run this is: Caused by: org.jruby.exceptions.RaiseException: (Errno::ENOENT) /APP_SERVER/lib/asciidoctorj-pdf-1.5.0-alpha.9.jar!/gems/Ascii85-1.0.2/lib/asciidoctor at org.jruby.RubyFileTest.file?(org/jruby/RubyFileTest.java:131) at RUBY.contains_requirable_file?(/APP_SERVER/lib/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/basic_specification.rb:46) at org.jruby.RubyEnumerable.any?(org/jruby/RubyEnumerable.java:1473) at RUBY.contains_requirable_file?(/APP_SERVER/lib/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/basic_specification.rb:46) at org.jruby.RubyEnumerable.any?(org/jruby/RubyEnumerable.java:1473) at RUBY.contains_requirable_file?(/APP_SERVER/lib/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/basic_specification.rb:44) at RUBY.find_inactive_by_path(/APP_SERVER/lib/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:898) at org.jruby.RubyEnumerable.find(org/jruby/RubyEnumerable.java:592) at RUBY.find_inactive_by_path(/APP_SERVER/lib/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:897) at RUBY.try_activate(/APP_SERVER/lib/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:183) at RUBY.require(/APP_SERVER/lib/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:132) at RUBY.(root)(<script>:9) Interestingly it seems to be looking for asciidoctor in the wrong directory as it should be looking in asciidoctorj-1.5.2.jar!/gems/asciidoctor instead of asciidoctorj-pdf-1.5.0-alpha.9.jar!/gems/Ascii85-1.0.2/lib/asciidoctor . Any help is appreciated. John |
Administrator
|
John, I'm kind of at a loss here. Ruby likely loops through all the gem file directories looking for a require, so the fact that it is looking into that directory may be normal. The fact that it fails there is what is not normal. It should skip it and move on if that's the case. Part of me wonders if this stems back to the swallowing root cause exception problem in 1.5.2. When we get 1.5.3 release, that's really going to smooth out a lot of problems. Lesson learned if that's the case. My other thought it is try JRuby 9000. That may seem like a drastic move in some respects, but it's already proven to behave much better than JRuby 1.7. But that cause also be totally unrelated to this issue. Just something to consider (or start considering). Other than that, as I said, I'm at a bit of a loss as to what to suggest. -Dan On Wed, Oct 7, 2015 at 4:32 PM, johncarl81 [via Asciidoctor :: Discussion] <[hidden email]> wrote: We're running into an issue when trying to generate a pdf using asciidoctorj-pdf. Interestingly this only appears on our production system, on our development system it works fine. Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
Dan,
Thanks for your reply and help on this issue... I think I missed your reply here along the way. Looks like we solved the issue(s) here: https://github.com/asciidoctor/asciidoctorj/issues/402 It was a combination of using the wrong version of JRuby and a permission on the /tmp directory. John |
Administrator
|
\o/ In the end, success!On Mon, Nov 9, 2015 at 10:57 AM, johncarl81 [via Asciidoctor :: Discussion] <[hidden email]> wrote: Dan, -- Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |