I recently got to grips with using Vagrant for web development. The VM environment I was able to create mirrors the one I created on our production servers at work. I also decided to go the whole-hog and create my own Debian Squeeze base box from scratch with the latest versions of VirtualBox Guest Additions, Ruby, OS updates etc. For a copy of it feel free to email me.
However, at the end of the process I encountered one problem. When I modified a file locally in the VirtualBox Shared Folder (/vagrant in the VM) and then loaded it through the web server (e.g. http://localhost:1337/css/styles.css) it would not show the changes I had made to the file. Instead I would just receive the old version of the file.
After some investigation and googling I discovered the problem is that VirtualBox’s Shared Folders do not fully support sendfile(). At the time of writing VirtualBox is on version 4.1.6.
The problem is easily fixed by disabling sendfile support in your HTTP server.
sendfile() is an optimisation for reading and transmitting file contents. Disabling it within a development environment will not cause any compatibility issues and will only cause a completely negligible performance decrease. More information here.