-
Notifications
You must be signed in to change notification settings - Fork 124
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
Fails to require GEMs #718
Comments
|
You're right, @abelsromero , it's a long way out of date! Unfortunately, $ ./gradlew asciidoctor
Successfully installed asciidoctor-2.0.21
Successfully installed asciidoctor-revealjs-5.1.0
2 gems installed
> Task :asciidoctor
Exception in thread "main" org.jruby.exceptions.LoadError: (LoadError) no such file to load -- asciidoctor-revealjs
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017)
at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85)
at RUBY.<main>(<script>:1)
> Task :asciidoctor FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':asciidoctor'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 35s
2 actionable tasks: 2 executed |
Sorry, forgot to come back. I could reproduce the issue in my machine (Linux) but could not deal with it currently. The current effort is in fixing docs, then we can address this. |
Is there any workaround for this or is the only solution to wait for code fix? |
Comment out the requires line. In 4.x all GEMs are rolled up in a JAR which are placed on the classpath.
Get BlueMail for Android
…On 12 Mar 2024, 00:08, at 00:08, Austin Arbor ***@***.***> wrote:
Is there any workaround for this or is the only solution to wait for
code fix?
--
Reply to this email directly or view it on GitHub:
#718 (comment)
You are receiving this because you are subscribed to this thread.
Message ID:
***@***.***>
|
Removing the requires line doesn't seem to work for me (certainly not for all GEMs at any rate; for example asciidoctor-tabs definitely doesn't work). I found a slightly grungy workaround though: asciidoctorj {
requires(
project.layout.buildDirectory.file(".asciidoctorGems/gems/asciidoctor-revealjs-5.1.0/lib/asciidoctor-revealjs.rb")
)
} |
I was also trying with the asciidoctor-tabs extension but couldn't get it to work |
It's pretty important to be able to add additional gems. Is the problem with this plugin, or in the JRuby plugin? I don't think we want to see a proliferation of builds that are relying on internal behavior, so it seems to be something worth figuring out. |
While I fully agree with @mojavelinux that the proliferation of a workaround is undesirable, in the interests of expediency, @austinarbor asciidoctor-tabs works for me with this: asciidoctorj {
requires(
"asciidoctor",
project.layout.buildDirectory.file(".asciidoctorGems/gems/asciidoctor-tabs-1.0.0.beta.6/lib/asciidoctor-tabs.rb")
)
} See here for an example project. |
@markslater thanks! can confirm this works on Gradle 8.6, but does not appear to work on Gradle 8.7
|
@austinarbor see #725 |
I'm having some difficulty requiring GEMs, using the example from the documentation.
Here's my build script:
And here's the output:
I'm running:
I'm guessing there's some problem with the Ruby path configuration because I see:
I'm very new to Asciidoctor, so apologies if I've missed something obvious. Full reproducer here
The text was updated successfully, but these errors were encountered: