Got this error on production but can\'t figure out where the problem is. Same request works fine on local development. But fail on production. I\'m building API for mobile c
Just adding if it can be of help to someone who is trying to find the solution to the error , while trying to write .jpg or any image files.
"wb" instead of "w" in File.open(filename,'wb') has solved this issue for me.
File.open(filename,'wb')