You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i package an app (tested under Mac OS) and i try to load some files that are part of the jar this files. Some debugging later i found out that the working Dir of the app is '/'
Dir.getwd printed '/', and this is not within the jars sandbox or so:
Debugging alert:
alert(Dir.entries(Dir.getwd).flatten)
So how can i load files packaged in the jar with ruby. @PragTob Mabybe you can help you old teacher :)
The text was updated successfully, but these errors were encountered:
The recommendation for finding files that are within your package is to look for them relative to your source files:
# From some Ruby file in your project
file_to_read = File.read(File.join(__FILE__, "../other/file.rb"))
Images will automatically work relative to your application root by themselves when used with the Shoes image method, but other file types you'll need to handle yourself relatively. Does that make sense?
If i package an app (tested under Mac OS) and i try to load some files that are part of the jar this files. Some debugging later i found out that the working Dir of the app is '/'
Dir.getwd printed '/', and this is not within the jars sandbox or so:
Debugging alert:
So how can i load files packaged in the jar with ruby.
@PragTob Mabybe you can help you old teacher :)
The text was updated successfully, but these errors were encountered: