Rails Generate Error: No Such File or Directory - Getcwd

Rails generate error: No such file or directory - getcwd

The error is caused by an existing Rails Spring process running in the background.

You can easily solve this by running ps ax | grep spring to find the process id and then kill it.

There's an issue on the Rails GitHub about this:
https://github.com/rails/spring/issues/247

No such file or directory - getcwd

Found out pg was installed instead of mysql2 in bundler.

No such file or directory - getcwd error on rubygems on Mac Os Lion

I had that same issue.... running sudo gem update --system fixed the problem... give it a try.

Error: `class_eval': No such file or directory - getcwd (Errno::ENOENT)

Yes, I found the cause:

The reason was I had opened the webrick server in a tab rails server --debugger

Means If webrick server is already running , we can't run any command like scaffold generate model will not be working.

Thanks !

Sidekiq process on Elastic Beanstalk - Errno::ENOENT: No such file or directory - getcwd

As foreshadowed in both the question and some answers this was a rogue process that avoided termination, in this case due to a careless config change in one of our early deployments. Line 30 of our sidekiq.config controls the number of processes, and we dropped from 2 to 1 but did not manually remove the second process from the server after the change.

The moral of the story is that Sidekiq processes are not only vulnerable to unexpected behavior during deployments. Our errant process was happily completing jobs even without being stopped/started across multiple deployments, but anything that relied on Dir.pwd and presumably any other script requiring ENV data would fail days after a stable deployment if run on the persistent process.

If you see this type of failure, be absolutely positive you don't have unexpected processes running from prior deployments. This means ensuring they are properly terminated during deployment as @JeffD23 mentioned but ALSO ensuring you don't have something hanging around from deployments of yore.

env: ruby_noexec_wrapper: No such file or directory error

this same thing happened to me, i fixed it according to this comment: https://github.com/sstephenson/rbenv/issues/337#issuecomment-13235367

by running these commands

gem install rubygems-bundler
rubygems-bundler-uninstaller
gem uninstall rubygems-bundler


Related Topics



Leave a reply



Submit