logo       

Re: [jruby-user] Bundle entire ruby environment into a single jar: msg#00220

lang.jruby.user

Subject: Re: [jruby-user] Bundle entire ruby environment into a single jar

Tony Eichelberger wrote:
Does anyone know if it is possible to bundle jruby with the gems I want into a single jar file? I want to be able to distribute jruby with certain gems for a number of internal projects and having it be just one jar file would be very nice.

Thanks for any input on this.

At the moment, no, it's not possible. The primary issue preventing it is that a number of Ruby libraries (including parts of RubyGems itself) expect to be able to do File operations to locate gem specs, library files, and so on. File only works with filesystem locations supported by Java's java.lang.File, so once we put things inside the JAR file there's no way to use File to work with them anymore.

However, we have long desired to make File work equally well with URLs, like the JAR file URL you'd get for files within a JAR. And I believe there's been some work in other projects on creating a "virtual filesystem" based on URLs in Java.

But it doesn't exist yet. It would be a huge contribution for someone to tackle it. You could even write it in Ruby first :)

An alternative to this would be a modification to RubyGems to use a different mechanism for filesystem searching.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise