In the ocra documentation it mentions Dir.chdir File.dirname($0)
but I didn't get what it meant when it was mentioned.
If you need to use say an image file in your script you can make sure it works merely by having this Dir.chdir(File.dirname($0))
line before you try to use any of your images.
For example in my app I'm using an image file and I couldn't get my exe to work if it wasn't in the same dir as the file but with the below it works anywhere so far.
Dir.chdir(File.dirname($0))
shape = File.join('warning3.png' )
I think this sets the script's current directory to the exe's directory inside it? If I'm wrong please let me know!