0

I'm using ruboto (ruby) on an android tablet. I'd like my source to be in a subdirectory of the usual default source directory. Is there a way to do this?

Nick Keighley
  • 161
  • 2
  • 5

1 Answers1

0

You have not stated your motivation for placing the Ruby source in a subdirectory, so I'll speculate that it is for tidiness in a polyglot environment. Also, I'll assume you want all the Ruby source in the same directory, including source for Activity classes.

Adding your path to both the Ruby $LOAD_PATH and the Android component search path has been combined into one method in org.ruboto.JRubyAdapter.addLoadPath. In JRubyAdapter.setUpJRuby, you can find a call to addLoadPath around line 289: https://github.com/ruboto/ruboto/blob/1.4.0/assets/src/org/ruboto/JRubyAdapter.java#L289

You can add your own call below the existing one:

addLoadPath("file:" + apkName + "!/<your_path_here>")

That will add the path to the Ruby load path and the Android component search path.

If you have a clear use case, I would submit it to the Ruboto tracker at https://github.com/ruboto/ruboto/issues . It sounds like something more Ruboto developers could use.

donV
  • 1,091
  • 7
  • 15