自动加载常量时检测到循环依赖

自动加载常量时检测到循环依赖

问题描述:

将我的操作系统更新到 Maverics 后,我无法在 Rails 中创建新项目.我总是只看到:

After update my OS to Maverics im unable to make new project in rails. I always see only:

Circular dependency detected while autoloading constant LinksController

   Unable to autoload constant LinksController, expected 
   /Users/xxx/DEPLOY/yyyy/app/controllers/links_controller.rb to define it

当我尝试制作时:

<%= link_to 'abc', link_path(f) %>

我的 LinksController 是一个空控制器,只有:

My LinksController is an empty controller with only:

def show
end

怎么了?我无法制作任何新项目.

What is wrong? Im unable to make any new project.

就我而言,我有一个名为 TwitterRETRIEVER 的模块,而 Rails 似乎在寻找 TwitterRetriever.按照 Rails 命名标准更正后,这个问题就没有了.

In my case, I have a module name TwitterRETRIEVER, while Rails seems to looking for TwitterRetriever. After correct this to follow Rails naming standard, this problem is gone.