I have these lines on top of my Ruby code, and tried multiple combinations but none of them have worked.
$:.unshift File.dirname($0)
Dir.chdir(File.dirname($0))
I have a config file that is in the same directory than the exe created by Ocra. The file is loaded by this:
cnf = YAML.load_file('config.yml')
However, the file doesn't load from the same directory as wanted. The error, I think, tells it tries to load it from the temporary directory when the exe runs.
How can I get the script load the config.yml file from the same directory than the exe?