These are chat archives for jruby-gradle/jruby-gradle-plugin

17th
Feb 2016
Blane Dabney
@raelik
Feb 17 2016 04:16
Not sure if anyone's around atm, but is there a way to have jruby-gradle install a gem from a github repo instead of rubygems?
R. Tyler Croy
@rtyler
Feb 17 2016 04:49
@raelik it cannot right now without kind of manually hacking it with a JRubyExec that does a gem build and gem install
a github repo doesn't have a proper rubygem manifest in it
Blane Dabney
@raelik
Feb 17 2016 04:49
I'm down for that actually, as long as I can get something workable going until 1.3 is released
would a flatDir pointing at the gem source work?
seems like that would have the same problem
R. Tyler Croy
@rtyler
Feb 17 2016 04:52
I can't think of anything I've got floating around in open source world that does a gem build and install
Blane Dabney
@raelik
Feb 17 2016 04:53
Damn, I'm in a catch-22 with this thing
I have a private rubygems repo I could push it to if 1.3 was out
(assuming 1.3 supports basic auth for rubygems repositories)
R. Tyler Croy
@rtyler
Feb 17 2016 04:57
I thought we merged that for 1.2?
Blane Dabney
@raelik
Feb 17 2016 04:57
Doesn't look like it
R. Tyler Croy
@rtyler
Feb 17 2016 05:02
and #264 wasn't what incorporated that fix?
I don't remember seeing a version bump of rubygems-servlets coming in prior
Blane Dabney
@raelik
Feb 17 2016 05:03
#264 is the version bump, but it wasn't merged, I'm guessing because of the travis issue
it was that java.lang.IncompatibleClassChangeError issue
I wonder if that's because rubygems-servlets 0.2.3 now depends on jetty 9.3.5.v20151012
Blane Dabney
@raelik
Feb 17 2016 05:10
that or it's the whole jdk7/8 thing... no, shouldn't be that, rubygems-servlets is set to compile for 7
somewhat late here, so I'm not totally coherent :P
Christian Meier
@mkristian
Feb 17 2016 12:00
I see the same stacktraces locally but it does not fail. and I do not understand those stacktraces.
R. Tyler Croy
@rtyler
Feb 17 2016 15:56
@mkristian neither do I :( perhaps we could enlist @headius to help us grok it?
Christian Meier
@mkristian
Feb 17 2016 15:59
hmm - not really a jruby problem more a gradle classloader issue or so
Blane Dabney
@raelik
Feb 17 2016 16:07
well, in the meantime I figured out a workaround. I have a non-jruby project that uses the same gem and Bundler, so I'm just running gem server in that project to serve as a local rubygems server
actually, not sure that's working either
can you use more than one rubygems() repository?
Christian Meier
@mkristian
Feb 17 2016 16:18
yes you can have more then one rubygems() repo.
@raelik -^
Blane Dabney
@raelik
Feb 17 2016 16:19
ok, just making sure. I'm having a different issue then
...it's like gem server doesn't acutally work as a rubygems server
Christian Meier
@mkristian
Feb 17 2016 16:22
the gem server from rubygems itself - I thought it is a proper rubygems repo server - but never tried it.
Blane Dabney
@raelik
Feb 17 2016 16:24
It doesn't appear to be
it doesn't respond to any of the /api/v1 calls anyway
Christian Meier
@mkristian
Feb 17 2016 16:24
it uses the old API probably
specs.4.8 and quick/Marshal.4.8/*gemspec.rz files
Blane Dabney
@raelik
Feb 17 2016 16:25
I'm guessing so. I'll have to use something else then
yeah
Christian Meier
@mkristian
Feb 17 2016 16:25
you could start a rubygems-servlet in jetty :)
just the proxy
Blane Dabney
@raelik
Feb 17 2016 16:26
yeah, but I need to serve a locally installed gem
other than converting this project over to bundler, which I don't want to do, that's the only way for me to get this gem installed
Christian Meier
@mkristian
Feb 17 2016 16:28
heh - that is not a way. let me give some more time to this failures on travis - I can spare half an hour right now
Blane Dabney
@raelik
Feb 17 2016 16:28
well, I still need this option, even if you get that working.
I have to be able to test this gem before I can justify pushing it to our private geminabox server
since right now, it only exists as a private github repo.
Christian Meier
@mkristian
Feb 17 2016 16:29
can you go via local maven repo ?
I mean on the consuming side where you need the gem ?
Blane Dabney
@raelik
Feb 17 2016 16:30
No. This is a pure ruby gem, no jruby involved
Christian Meier
@mkristian
Feb 17 2016 16:30
so the consuming part is not gradle ?
Blane Dabney
@raelik
Feb 17 2016 16:30
the consuming part is yes, and yeah, I could if I knew enough about maven to do that
and I can't ask the non-java devs on my team to deal with that either :/
Christian Meier
@mkristian
Feb 17 2016 16:31
gem install ruby-maven; rmvn install where the gemspec of your gem is
works with mri and jruby
R. Tyler Croy
@rtyler
Feb 17 2016 16:32
why would you use ruby-maven instead of just gem build && gem install?
Christian Meier
@mkristian
Feb 17 2016 16:32
and packs the gem with maven and installs it in you local maven repo. in gradle you need to add mavenLocal() to your repositories
Blane Dabney
@raelik
Feb 17 2016 16:32
@rtyler: I'm not sure how gem build && gem install applies here
Christian Meier
@mkristian
Feb 17 2016 16:32
@rtyler he needs it to be consumed by gradle
Blane Dabney
@raelik
Feb 17 2016 16:33
the gem in question is a dependency for a jruby-gradle project, but it only exists in a private github repo
R. Tyler Croy
@rtyler
Feb 17 2016 16:33
@mkristian ah, I didn't realize that rmvn install would drop that into maven local
that seems like a handy feature :P
Blane Dabney
@raelik
Feb 17 2016 16:34
I can ultimately push it up to a private rubygems server, but until I test it, I can't do that, plus 1.3 will need to go out before I can use that, as it requires authentication
@mkristian ruby-maven might work for me
Christian Meier
@mkristian
Feb 17 2016 16:35
@rtyler it can be handy for gradle as well since maven repo are no problem for gradle
Blane Dabney
@raelik
Feb 17 2016 16:35
How would I add that as a dependency though, seeing as it would be in my local maven repo
same gem 'rubygems:...' syntax?
Christian Meier
@mkristian
Feb 17 2016 16:36
no need to change the dependency in your build.gradle
R. Tyler Croy
@rtyler
Feb 17 2016 16:36
@mkristian agreed
@mkristian this could be interesting for you http://linuxwochen.at/ btw
i'm not sure I'll be traveling for it, but we will have some Jenkins people there I believe
Christian Meier
@mkristian
Feb 17 2016 16:39
@rtyler looks interesting
Blane Dabney
@raelik
Feb 17 2016 16:39
@mkristian ok, so I don't see how I can use this to install a github gem into a local maven repo
Christian Meier
@mkristian
Feb 17 2016 16:41
github gem ? git clone hhh.git; cd hhh; rmvn install or is it something else ?
Blane Dabney
@raelik
Feb 17 2016 16:41
ohhhh ok, I see
I missed that bit :P
Christian Meier
@mkristian
Feb 17 2016 16:41
well, a Gemfile with some :git => ... will not work !
Blane Dabney
@raelik
Feb 17 2016 16:42
Nah, it doesn't have that
the Gemfile just has gemspec in it
Christian Meier
@mkristian
Feb 17 2016 16:43
that is OK
Blane Dabney
@raelik
Feb 17 2016 16:51
is there a way to tell rmvn to not install dependencies?
all the dependencies for this thing are available on rubygems, it's just the gem itself that is private
Christian Meier
@mkristian
Feb 17 2016 16:52
I afraid - no
the usual annoying maven thing using it on new project the first time
Blane Dabney
@raelik
Feb 17 2016 16:52
so gross
Christian Meier
@mkristian
Feb 17 2016 16:52
loads of downloads
Blane Dabney
@raelik
Feb 17 2016 16:53
oh well, it's temporary anyway
Christian Meier
@mkristian
Feb 17 2016 16:58
@rtyler with jdk7 we run only ONE embedded rubygems-servlet test, with jdk8 we run 2 which fails. so I commented out the second for jdk8 as well and looks it goes further and might even turn green
R. Tyler Croy
@rtyler
Feb 17 2016 17:01
huh
Christian Meier
@mkristian
Feb 17 2016 17:09
so we go with this now ? it is green ! not totally happy but we had strange errors on jdk7 as well and also in combination with gradle test environment
@rtyler -^
Blane Dabney
@raelik
Feb 17 2016 17:21
@mkristian using ruby-maven worked, thanks!