|
|
|
This is a slightly contrived but functional example showing that a call to File.expand_path breaks when an app is deployed via JRuby.
Main.java is in place so that there is a Java class to kick things off. It evals some Ruby code to load main.rb, which would typically hold the start of the app logic. main.rb tries to require another Ruby file, code.rb (both files are in the src/ directory). The require call fails because it is using File.expand_path. Main.rb also has some (commented) code that alters File.expand_path to look for and remove paths that contain an http:// There is also a jnlp file that you will need to adjust for the correct URL. james.britt@gmail.com if you have questions. Since you updated fairly recently, I presume this bug is still affecting you, yes?
Charlie,
Sorry for taking so long to get back to you. I just updated to the newest version, and the problem seems to effect OSX now. Minutes before the same web start app was running for me. At least it's consistent across platforms now (: In short, yep, we're still affected. I do have a workaround (which complements James's workaround, depending on what's needed). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
When active_support is required:
no such file to load – http://www.happycamperstudios.com/monkeybars/copy-center/CopyCenter.jar!/lib/ruby/active_support/inflections
Active support requires inflections like so:
require 'active_support/inflector'
Active support sits in the lib/ruby directory, which gets packed into the jar.
Relevant Load Path:
C:/Documents and Settings/Administrator/http:/www.happycamperstudios.com/monkeybars/copy-center/CopyCenter.jar!/lib/ruby