I’m using jruby and have been putting my gems in a jar like this
java -jar jruby_complete.jar -S gem install -i gem_jar.jar nokogiri erubis
This creates a jar “file” and correctly installs the gems. I can add this jar “file” to my search path and my project will run, however when I go to do a distribution build in netbeans, it complains about the gem_jar being a directory.
A .jar is just a zipped directory, or so I thought, so I ran
zip gem_jar.zip gem_jar; mv gem_jar.jar gem_jar.old; mv gem_jar.zip gem_jar.jar
Netbeans no longer complains, but the project won’t run. How have I failed at coercing my gem jar into an actual compressed jar file?
The issue is that the
-iflag on jruby is not creating a jar. That was a false assumption on my part. The correct method is this