I got this error today while deploying rails application on running lighttpd server. Errno::ENOENT (No such file or directory – getcwd) I replaced application directory without stopping lighty and got error while trying accessing app via browser. I went off by merely restarting lighthttpd :)
Seems like server creates/uses some file “within” rails app folder which got erased while replacing the folder.