I / O Error Using Vagrant & winnfsd

I am using the vagrant-winnfsd plugin to add NFS support using Vagrant on a Windows 8.1 host. Ubuntu 14.04 guest is working for me.

I use this setting to run a Rails application. Everything works fine, except when Rails / Carrierwave tries to delete files from tmp dmp that generate this error:

Errno::EIO (Input/output error @ dir_s_rmdir - /vagrant/myproject/public/uploads/tmp/1421108602-18479-5242): 

Here is a link to part of my roaming file:

 config.vm.network "private_network", type: "dhcp" config.vm.synced_folder ".", "/vagrant", type: "nfs" 

Any ideas on how to resolve this?

+6
source share
1 answer

Finally, I was able to solve this problem using this approach proposed in one of the GitHub tickets.

This mainly refers to pointing Rails and Carrierwave to a directory outside the / vagrant folder to dump tmp files in order to avoid locking / resolution problems:

 # config/initializers/01_patch_tmpdir.rb class Dir def self.tmpdir '/home/vagrant/rails_tmp/' end end CarrierWave.configure do |config| config.cache_dir = '/home/vagrant/uploads_tmp/tmp/uploads' config.root = '/home/vagrant/uploads_tmp/tmp' end ENV['TMPDIR'] = Dir.tmpdir 

Now you can add this file to your .gitignore so that it does not interfere with other people working on your project.

+2
source

Source: https://habr.com/ru/post/980899/


All Articles