I’m having a strange issue and I’m trying to wrap my head around it and
unfortunately, I’m not having much luck.
Let me simplify my directory structure and show you what’s happening:
app.rb just contains some standard requires:
When the xrc_source.rb is required, inside of xrc_source.rb is the
… which is automatically generated by running the xrcise command:
xrcise -o xrc_source.rb xrc_source.xrc
So Sugar is creating the load line. Now, so far so good. When I try to
run my app out of the lib directory using ruby app.rb it launches and
the gui is working just fine.
If I try to package this using ocra and type ocra app.rb it
automatically creates an app.exe executable file. If I double-click the
exe file, it launches and everything is good. Again, so far so good.
Now, if I move this new executable file anywhere else, and launch it, I
receive the following error:
Cannot load resources from file ‘xrc_source.xrc’.
So, does this mean that if I use wx_sugar, I won’t be able to create a
stand-a-lone GUI app with ocra? Notice, I’m not receiving any errors
concerning any other loads or requires from my other files. The only
error is occurring from the xml.load method inside of the file that was
created via xrcise.
I’m sure there must be a way around this.