I'm using ocra to convert my rb scripts to exe, but if it has multiple sources, the exe will show the LoadError complaining it can't find the other source files.
For example, in my main.rb:
require_relative 'lib/user'
# blabla bla
after I packing my main it with either ocra main.rb ocra main.rb ./lib/user.rb, then run the main.exe elsewhere and it says cannot load such file -- lib/user (LoadError)
How do I make it work with multiple sources?
OK so I missed this from the manual...
added
$:.unshift File.dirname($0)at the start of my entry script, also changed myrequire './somescript'torequire 'somescript'then it works