Forum: JRuby Warbler + jbundler problems

C0cb3aadb9a66d00df16686f4a1fc312?d=identicon&s=25 Tim Uckun (Guest)
on 2014-04-16 05:48
(Received via mailing list)
I am trying to use warbler and jbundler together. I have set up a
Jarfile
with a few jars and after dealing with some missing dependency problems
was
able to do a jbunle install.

here is the Jarfile

jruby '1.7.11'

jar 'com.amazonaws:amazon-kinesis-client', '1.0.0'
jar 'com.amazonaws:aws-java-sdk', '1.6.12'
jar 'org.postgresql:postgresql', '9.3-1100-jdbc4'

 After this I created an executable jar using jbundler like this

jbundle executable -b bin/entry_point

When I try to run that jar file I get this error

LoadError: no such file to load -- rubygems
  require at org/jruby/RubyKernel.java:1085
   (root) at classpath:jar-bootstrap.rb:3

Ok so next I try warbler

It creates the jar file no problems but gives me this error when I run
it

error: java.lang.ClassNotFoundException:
org.jruby.embed.ScriptingContainer
B05d3cbc64b0031a24c2887fb6ddc173?d=identicon&s=25 christian (Guest)
on 2014-04-16 12:01
(Received via mailing list)
On Wed, Apr 16, 2014 at 4:47 AM, Tim Uckun <timuckun@gmail.com> wrote:

> bin/entry_point



could you provide the content of that file as well at least until line 3
;)
B05d3cbc64b0031a24c2887fb6ddc173?d=identicon&s=25 christian (Guest)
on 2014-04-16 12:40
(Received via mailing list)
I used an empty Gemfile (just the source declaration) and your Jarfile
and
simple entry_point:

require 'rubygems'
puts 'hello world'

which works on the current master of jbundler.



PS I have a look at warbler + jbundler after the I understood the
problem
with jbundler. I was about to release a new version of jbundler today
but
wait until this one is clear.
C0cb3aadb9a66d00df16686f4a1fc312?d=identicon&s=25 Tim Uckun (Guest)
on 2014-04-16 15:40
(Received via mailing list)
This is the entire file

#!/usr/bin/env jruby$:.unshift File.expand_path( File.join('..','..'),
__FILE__ )$:.unshift File.expand_path( File.join('..','..', 'lib'),
__FILE__ )require 'Application'Application.start
C0cb3aadb9a66d00df16686f4a1fc312?d=identicon&s=25 Tim Uckun (Guest)
on 2014-04-16 15:44
(Received via mailing list)
As far as I can tell using jbundler to create a jar results in a very
small
jar file. I am not sure what is missing from it though.

If I use warbler without jbundler then I get a jar file roughly 100 megs
and it works as long as I don't make references to directories when
requiring things.  For example I had some code with recursed through
directories and required the jars it found but that didn't work when the
app was running as a jar.

If I use warbler with jbundler I get a much bigger file but it doesn't
seem
to include jruby in it.
B05d3cbc64b0031a24c2887fb6ddc173?d=identicon&s=25 christian (Guest)
on 2014-05-01 11:54
(Received via mailing list)
just a little follow up:

the jbundler only issue could be same as this:
https://github.com/mkristian/jbundler/issues/34#is...

the warbler+jbundler issue is a bug:
https://github.com/jruby/warbler/issues/261
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.