what's happening or not happening? On some platforms you might need to
change the mode to 'wb'
Also, when are the contents of tmp directory deleted?
Never. RAILS_ROOT/tmp is just conceptually for temporary stuff. Apart
from that it's just a normal folder. For actual temporary files (as
Tempfile might create) it depends on your platform (and in some cases
on the system administration policies in effect on the machine.
what's happening or not happening? On some platforms you might need to
change the mode to 'wb'
I am using OpenSuse OS. I guess 'b' is needed on Windows OS to save it
as a binary file.
Problem: I don't see any such file on my filesystem.
Also, when are the contents of tmp directory deleted?
Never. RAILS_ROOT/tmp is just conceptually for temporary stuff. Apart
from that it's just a normal folder. For actual temporary files (as
Tempfile might create) it depends on your platform (and in some cases
on the system administration policies in effect on the machine.
So I may need to change my file path. I am saving these files for some
further processing and then rendering. So I don't want to store them
permanently. Can someone suggest me a way to accomplish this task?
what's happening or not happening? On some platforms you might need
to
change the mode to 'wb'
I am using OpenSuse OS. I guess 'b' is needed on Windows OS to save it
as a binary file.
Problem: I don't see any such file on my filesystem.
more likely that you don't have write access or you're ending up
building a duff path. Inspect the exact path you're trying to use and
check permissions and so on.
The reason no error is thrown has nothing to do with Rails, but Ruby.
IO write is the actual method that is being called, correct?
See this: Class: IO (Ruby 3.1.2)
According the the Ruby API is returns the number of bytes written. I
would suggest you add a check on your write method that the number of
bytes > 0 and log an error.