Errno :: ETXTBSY: text file busy @unlink_internal

Error:

Errno :: ETXTBSY: text file busy @unlink_internal - / home / vagrant / shared / sample_app / db / test.sqlite3 / home / vagrant / shared / sample _app / test / test_helper.rb: 3: in <top (required)>' /home/vagrant/shared/sample_app/test/helpers/static_pages_helper_test.rb:1:in ' Tasks: TOP => test: run => test: units (See Complete trace by completing the task with --trace)

+5
source share
2 answers

Workaround:

The error is related to Vagrant (or VirtualBox) user public folders. I could not figure out how to solve it, but there is a workaround. Instead of working with the abusive user shared folder (~ / shared / sample_app) defined in the vagrantfile, I moved the application folder to the standard shared folder inside the VM root (/ vagrant) . Now I am still getting file synchronization on my main machine, and the problem disappeared.


UPDATE 1

Another conclusion reached today. Each time bundle exec rake db:migrate or rails generate migration an error is returned.

Another workaround
1 - Delete the test.sqlite3 file.
2 - Copy the development.sqlite3 file
3 - Insert and change the name to test.sqlite3

* - Just migrated for testing, and this seems like a permanent solution.

+4
source

Move the database files outside of the firewall, for example, to / tmp.

change database.yml:

 development: <<: *default database: /tmp/project/development.sqlite3 test: <<: *default database: /tmp/project/test.sqlite3 
+3
source

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


All Articles