mitchellh/vagrant — Issue #705: Error (excon gem) when deleting file on /vagrant/* path
Author: brunomac
Created: 2012-02-02 18:20:28+00:00
State: open

Hello guys,
first of all, thanks for your incredible gem.
I've been struggling with an error when trying to configure a Rails app (rails 3.1.3, ruby 1.9.2p290, carrierwave 0.5.8) with carrierwave uploading files to s3 as the code works perfectly on heroku but crashes when running through vagrant.

When carrierwave tries to delete the tmp file, it raises this error:
Errno::ETXTBSY (Text file busy - /vagrant/APP_PATH/tmp/uploads/20120202-1015-1559-9701/Alfred_Hitchcock.jpg):
app/controllers/media_assets_controller.rb:53:in `block in create'
app/controllers/media_assets_controller.rb:52:in `create'

After discussing this issue on the carrierwave issues (https://github.com/jnicklas/carrierwave/issues/550#issuecomment-3780677) we discovered that placing this app on another path not under /vagrant/XXX (in my case I copied it to ~/rails_test/) and all worked fine.

Can you please take a look at it, it would be great to be able to work with s3 from the development environment.

Thanks in advance.