简体   繁体   English

Typus 和 Rails 3.1 - 缺少常量 AdminsController

[英]Typus and Rails 3.1 - missing constant AdminsController

Gemfile:宝石文件:

gem 'rails', '3.1.0.rc4'
gem 'typus', :git => 'http://github.com/typus/typus', :branch => '3-1-unstable'

Obviously the name of the Git-branch suggests that it's error prone, but I think I might be missing something simple here.显然 Git 分支的名称表明它容易出错,但我想我可能在这里遗漏了一些简单的东西。 According to the documentation rails g typus and rails g typus:migration should be enough to get going.根据文档rails g typusrails g typus:migration应该足够开始了。

My problem is that I'm missing the AdminsController, after migrating and navigating to 0.0.0.0:3000 I get greeted by我的问题是我缺少 AdminsController,在迁移并导航到 0.0.0.0:3000 后,我受到了欢迎

uninitialized constant AdminsController未初始化的常量 AdminsController

and there is no AdminsController.rb in app/controllers.并且 app/controllers 中没有 AdminsController.rb。 Is this a bug in the 3.1 branch or am I missing something in the documentation?这是 3.1 分支中的错误还是我在文档中遗漏了什么?

Teddy bear theory strikes again.泰迪熊理论又来了。 Navigating to /admin/session/ greets me with a login page.导航到 /admin/session/ 会出现一个登录页面。 I get the feeling that navigating to /admin/ should still produce some output and not an error message though.我觉得导航到 /admin/ 仍然会产生一些 output 而不是错误消息。

Looking at the commits it's so bleeding edge that's probably a bug.查看提交它是如此的前沿,这可能是一个错误。

I see that you already notified developers by opening a ticket, hopefully they'll look into it soon.我看到您已经通过开票通知了开发人员,希望他们会尽快调查。

Happens to me also all the time with stuff that is trying to be 3.1 compatible, for which I create a patch when it's possible.尝试与 3.1 兼容的东西也一直发生在我身上,我会在可能的情况下为此创建一个补丁。

Cheers干杯

Turns out the problem was entirely my fault.原来问题完全是我的错。 I didn't have a clean admin namespace like I should have.我没有应该拥有的干净的管理命名空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM