Closed harbirg closed 5 years ago
The baked file system is not available to the operating system, so it can't run a baked-in executable. You'll need to copy the file to a file system that's accessible to the OS and then you can execute it.
Thanks and it makes sense. Would you happen to know methods available to copy contents of a file in the baked file system to disk? I will close this issue out soon after.
File.open(path, "w") do |file|
IO.copy(baked_file, file)
end
Thanks. Closing this out.
I'm trying to run an executable that will be embedded into my crystal application. I'm unable to run the following code ->
class FileStorage extend BakedFileSystem bake_folder "../include/" end file = FileStorage.get("path/to/executable") Process.run(file.path)
How do I go about accomplishing this. No issues in reading contents of embedded text files using .gets_to_end