-
Notifications
You must be signed in to change notification settings - Fork 40
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
Needs to be updated to work with bundler 2.0 #90
Comments
I tried changing this dependency locally after cloning this repo. Line 32 in 08f19e1
to
The tests are all green. However, I had to use
|
Any update here? |
Is there any update on this? I noticed there has been a change to fix this issue but the latest release (0.9.3) still won't work with bundler 2.0 and above. |
There are failing spec in the CI |
$ jruby -S jbundle install
...
You must use Bundler 2 or greater with this lockfile.
$ jruby -S bundler --version
Bundler version 2.2.16 Help, please! |
@mkristian I see that you already relaxed the constraint in the default branch to allow bundler 2. Would it be possible to release that? Bundler 2 is used everywhere now. |
@mkristian Will there be a release with the relaxed constraint? |
I think I ran into this tonight. I was tinkering with jruby, following this tutorial: https://blog.heroku.com/reactive_ruby_building_real_time_apps_with_jruby_and_ratpack. It's an old tutorial, I know, but I figured there'd still be good concepts to learn. I tried changing the Gemfile provided in the tutorial to use the version of jruby I had installed right now, which is 9.3.0.0. I ran into an error when I ran the
I was able to install version 1.17.3 of bundle, like the error output suggested, and run it with |
@mattwelke or anybody else, my advice would be to just use gradle and specify your maven dependencies in a build.gradle file. Its not a perfect solution, I'm always worried it'll pull in a java class or version of a library that conflicts with or overwrites something that JRuby itself is using, but jbundler is obviously an abandoned project at this point. For what its worth I haven't had any issues though using gradle to pull in Java libraries to my JRuby projects since 2019. |
@mohamedhafez Thanks for the update. I found the Jarfile and jbundler approach pretty elegant. It was nice to not have to do a full Maven or Gradle setup and still be able to declaratively list JAR dependencies. But I understand open source needs time invested in it. If it's hard to maintain jbundler, I think it's reasonable to ask JRuby users who want to use JAR dependencies to set up Maven or Gradle instead of using jbundler. I imagine only JRuby users with some knowledge of Java would want to use JARs directly anyways, so it's reasonable to assume they'd know about Maven or Gradle. I think I know of another way JRuby users can get their JAR dependencies. My understanding so far of JRuby is that it's possible to encapsulate JAR files within Ruby gems, in which case bundler takes care of everything without jbundler, Maven, or Gradle being needed. So perhaps an alternative to developers using Maven and Gradle in their Ruby projects would be to create simple gems that are just wrappers around the JAR dependencies. That way, bundler would then install every dependency, including the JAR files. In fact, I just tested this by adding
If I run
If I run
So it's clear to me that without having to set up Maven or Gradle, and without even using jbundler, bundler was able to fetch the exact version of the JAR file needed because this gem wrapped the JAR (and its JAR dependencies apparently). As for the concern of conflicting JAR files being used, as far as I know within the Java ecosystem, shading is used to help with this. Perhaps JRuby's build process could be changed to shade each of its dependencies, guaranteeing that there would be no conflicts with JAR dependencies JRuby users choose to use. That probably deserves a separate discussion though. |
I need to add my input to here:
|
As far as I recall, my one concern was that |
Currently, one of the dependencies is
bundler ~> 1.5
, but bundler 2.0 came out a few months ago.The text was updated successfully, but these errors were encountered: