Rails 生成错误:没有这样的文件或目录 - getcwd [英] Rails generate error: No such file or directory - getcwd
本文介绍了Rails 生成错误:没有这样的文件或目录 - getcwd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在新的 Rails 4.2 项目上运行 rails generate
时,我不断收到错误:
When running rails generate
on a new Rails 4.2 project, I keep getting the error:
~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.3.0/lib/spring/configuration.rb:37:in `pwd': No such file or directory - getcwd (Errno::ENOENT)
我该如何解决这个问题?
How can I fix this?
推荐答案
该错误是由在后台运行的现有 Rails Spring 进程引起的.
The error is caused by an existing Rails Spring process running in the background.
您可以通过运行 ps ax | 轻松解决此问题.grep spring
找到进程id,然后杀死它.
You can easily solve this by running ps ax | grep spring
to find the process id and then kill it.
Rails GitHub 上有一个关于此的问题:https://github.com/rails/spring/issues/247
There's an issue on the Rails GitHub about this: https://github.com/rails/spring/issues/247
这篇关于Rails 生成错误:没有这样的文件或目录 - getcwd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文