Packaging the RVM with GLI (possibly using JRuby?)
01 Mar 2012, 10:12
Joe Fair (2 posts)
Love the book. Just what I needed, and just when I needed it.
I’m in a mostly-Java environment with windows users, and I’d like to create and distribute a GLI app without requiring a Ruby install.
Have you played with using GLI in JRuby? If I assume I have a Java environment available, is there a good way to wrap up GLI and JRuby together?
Then again, requiring Java seems like an additional step compared to just distributing a GLI app and telling the users “And install Ruby”. Or putting the whole rvm in the distro and setting the environment variables in a batch file.
I don’t mean to make more work here at the end, but would you consider adding a page or link that talks about how to zip up a GLI app with and rvm, and what env settings to deal with to get it all to work?
01 Mar 2012, 14:57
David Copeland (85 posts)
Hmm, that is a tough one. RVM isn’t really something end-users should be using. It’s almost entirely designed for developers (though some use it on the server for server-side stuff).
JRuby has an “exe+JRE” install that you might be able to use; it’s just one install that, I believe, has both JRuby and the JVM (I apologize that I don’t have Windows available to test it out).
For running the app, you’ll likely need to make a .bat file, since Windows doesn’t support the “shebang” line like UNIX does. That will actually allow you to put whatever you need in that .bat file to locate the JRuby install and run the app; GLI apps should run via ‘jruby my_app foo -a bar’
GLI should work on JRuby (the unit tests pass, but since Aruba doesn’t work, I can’t fully vet it). If you find anything that doesn’t work, I’d love to hear about it, because I’d like GLI to work on JRuby (and Windows).
|You must be logged in to comment|