I have a java application, packaged into a .EAR file, that have code that runs in JRuby using script containers.
The ruby code runs normal, except when it need to require some other files that are packaged into the same .EAR file.
puts "x";
require 'my_other_ruby_file.rb';
Results in this error:
LoadError: no such file to load --my_other_ruby_file
Does anybody have some idea?
Thanks in advance.
Loading files in that way requires they be visible in the application's classpath. So depending on your EAR layout, you'll need to make sure that the part your JRuby app is deployed in can see the part where the .rb file is located.
Other than that, it's just standard EAR classpath behavior.