I'm having an issue with refile and vagrant using synced folders. The issue is that whenever i try to save a file the following error occurs:
Errno::ETXTBSY (Text file busy @ unlink_internal - /vagrant/vidya/tmp/uploads/ca che/2dcd0c3fd391985ffe88ea30d826890c817fe64756f5fb6c92408368caa0):
Here's the full stack trace http://pastebin.com/TaUn9eJW
This however works in the vagrant guest if it isnt within the synced folders. I used carrierwave to test if it would fail as well, it however didn't and carrierwave works fine with synced folders.
Is there anything that refile and or rails does that keeps that file busy?
I found that changing the dir where Refile caches and stores fixes the problem. It has to be outside the synced folders otherwise you will still get the error. From googling it appears this to be a windows issue as the host.
If anyone runs into this and needs a quick fix, add this into your application.rb file
Refile.store ||= Refile::Backend::FileSystem.new("/tmp/uploads/store".to_s)
Refile.cache ||= Refile::Backend::FileSystem.new("/tmp/uploads/cache".to_s)