No such file or directory - getcwd No such file or directory - getcwd ruby ruby

No such file or directory - getcwd


Some people received this error after trying to run from an already deleted directory.

I received this error after switching databases and leaving the server running. The old server info was still showing up but I was getting this error. Restarted my rails server and everything works fine with the new db.

Basically it means that there is a significant state change on the server, and your environment needs to be reset/restarted.


The key for me was starting a new terminal session.

I just ran into this after trying vagrant up on a newly created directory (after deleting one by the same name) in the same terminal session (oddly, for the first time after working with Vagrant for years). In my case I had already run vagrant destroy, so nothing about the environment needed to or could be be restarted. I was blocked until I started a new terminal session, then vagrant up ran smoothly again.