[英]Rails - bin/rails generate doesn't work in recreated project
I've just red "Getting Started with Rails" and trying to create a blog project again from scratch. 我只用了红色的“ Rails入门”,然后尝试再次从头开始创建博客项目。
I've created a new environment for rails projects with vagrant/virtualbox/ubuntu 12.04 我使用vagrant / virtualbox / ubuntu 12.04为Rails项目创建了新环境
Here is the problem. 这是问题所在。 I've create a new rails project with
我创建了一个新的Rails项目
rails new blog
Thereafter, using 之后,使用
bin/rails generate controller pages
I've create a controller, and continued working with project. 我创建了一个控制器,并继续进行项目工作。 After some time, I've decided to delete the blog project and start again from scratch.
一段时间后,我决定删除博客项目,然后从头开始。
I've started a new iteration 我开始了一个新的迭代
rails new blog | works fine
cd blog
bin/rails generate controller pages | does not create a controller, does not terminate, only with control + C
I've repeated all steps with a new project blog2. 我已经用新项目blog2重复了所有步骤。 And the result was the same.
结果是一样的。 If i create a new project, then delete it, then create a project with the same name
如果我创建一个新项目,则将其删除,然后创建一个具有相同名称的项目
bin/rails generate
will not work. 不管用。
Rubu 2.1.3/Rails 4.1.6 What should I do to fix it? Rubu 2.1.3 / Rails 4.1.6应该怎么做才能解决?
Solved by executing: 通过执行以下方法解决:
spring stop 弹簧停止
I had a similar issue when using RVM. 使用RVM时,我遇到了类似的问题。 I had to close that terminal, opened another terminal, then switched back to that version of ruby.
我必须关闭该终端,打开另一个终端,然后再切换回该版本的红宝石。
After that everything worked fine again. 之后,一切又恢复正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.