# 升级到 2.6 后分类页面和主页出现 Error 500

**URL:** <https://meta.discourse.org/t/error-500-on-category-page-and-homepage-after-upgrade-to-2-6/162155>\
**Category:** Self-hosting\
**Created:** [2020 年8 月 26 日 17:07 UTC](https://meta.discourse.org/t/error-500-on-category-page-and-homepage-after-upgrade-to-2-6/162155 "2020-08-26T17:07:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![Olivier\_Baillon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/olivier_baillon/32/72271_2.png) [@Olivier\_Baillon](https://meta.discourse.org/u/Olivier_Baillon)\
发布日期： [2020 年8 月 27 日 07:16 UTC](https://meta.discourse.org/t/error-500-on-category-page-and-homepage-after-upgrade-to-2-6/162155/4 "2020-08-27T07:16:04Z")

</div>

你说得对，我在 /logs 中多次遇到相同的错误：

NoMethodError (undefined method `hex' for nil:NilClass) app/models/upload.rb:180:in `base62\_sha1’  
app/models/upload.rb:174:in `short_path' app/models/upload.rb:146:in `short\_path’  
app/models/group.rb:767:in `flair_url' (eval):5:in `\_fast\_attributes’  
lib/freedom\_patches/ams\_include\_without\_root.rb:54:in `include!' lib/freedom_patches/ams_include_without_root.rb:57:in `include!’  
lib/freedom\_patches/ams\_include\_without\_root.rb:57:in `include!' app/controllers/application_controller.rb:440:in `serialize\_data’  
app/controllers/application\_controller.rb:449:in `render_serialized' lib/topic_list_responder.rb:16:in `block (2 levels) in respond\_with\_list’  
lib/topic\_list\_responder.rb:9:in `respond_with_list' app/controllers/list_controller.rb:102:in `block (2 levels) in class:ListController’  
app/controllers/list\_controller.rb:107:in `public_send' app/controllers/list_controller.rb:107:in `block (2 levels) in class:ListController’  
app/controllers/application\_controller.rb:340:in `block in with_resolved_locale' app/controllers/application_controller.rb:340:in `with\_resolved\_locale’  
lib/middleware/omniauth\_bypass\_middleware.rb:68:in `call' lib/content_security_policy/middleware.rb:12:in `call’  
lib/middleware/anonymous\_cache.rb:336:in `call' config/initializers/100-quiet_logger.rb:19:in `call’  
config/initializers/100-silence\_logger.rb:31:in `call' lib/middleware/enforce_hostname.rb:22:in `call’  
lib/middleware/request\_tracker.rb:176:in `call’

---

_[View the full topic](https://meta.discourse.org/t/error-500-on-category-page-and-homepage-after-upgrade-to-2-6/162155)._
