i am running jrubyscriptengine.eval() on a script which extends from
another script. how do i set the path for the script to locate its
parent with ‘require’.
The location of both the script and its parent will be known only at
runtime.
i am running jrubyscriptengine.eval() on a script which extends from
another script. how do i set the path for the script to locate its
parent with ‘require’.
The location of both the script and its parent will be known only at
runtime.
ScriptingContainer’s setLoadPaths() method or evaluate the LOAD_PATH
would work.
For example,
Another option that i was using is passing the load paths to the script
engine and later appending the path strings to the LOAD_PATH inside the
script before any require statements.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.