# 无法访问我们的一个类别

**URL:** <https://meta.discourse.org/t/unable-to-access-one-of-our-categories/170314>\
**Category:** Support\
**Created:** [2020年十一月17日 00:54 UTC](https://meta.discourse.org/t/unable-to-access-one-of-our-categories/170314 "2020-11-17T00:54:07Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)\
**Post date:** [2021年一月1日 20:25 UTC](https://meta.discourse.org/t/unable-to-access-one-of-our-categories/170314/9 "2021-01-01T20:25:30Z")

</div>

来自 (pry):3:in ` __pry__' [4] pry(main)> myCategory = Category.find_by(id 36) NoMethodError: 未定义方法 `id’ for main:Object  
来自 (pry):4:in ` **pry** ’  
[5] pry(main)\>

感谢 @Benjamin_D。如果有人需要执行此操作，请注意[此帖子](https://meta.discourse.org/t/changing-a-category-default-view-from-the-command-line/163428/2)的最后一步有一个小拼写错误，请使用 `myCategory.save!` 保存。

---

_[View the full topic](https://meta.discourse.org/t/unable-to-access-one-of-our-categories/170314)._
