问题
I'm using the Sidekiq gem to do some background processing involving video files. On my local machine everything works fine but I'm getting the aforementioned error in production. I read about Heroku's ephemeral filesystem and sure enough I'd restarted Heroku so that could be the problem? If it is I don't know how to deal with it given that there is already a tmp
folder in my app's root directory. This is the exact error I'm getting from my worker:
2015-09-09T21:41:37.859890+00:00 app[worker.1]: Errno::ENOENT: No such file or directory - /tmp/RackMultipart20150909-3-420sel.mp4
Any help will be greatly appreciated.
回答1:
You cannot share files between dynos. You'll need to upload to S3 and pass the S3 link to Sidekiq.
来源:https://stackoverflow.com/questions/32490336/no-such-file-or-directory-error-with-sidekiq-on-heroku